Pergunta de entrevista da empresa Cisco

write a javascript prototype for a class to alculate total number of items in a function which has nested arrays.

Respostas da entrevista

Sigiloso

18 de mar. de 2015

Recursive function ok but the last part is confusing "a function that has nested arrays" what is that function? how do we access it? does it return nested arrays?if so how many? I would have asked a lot of questions before that. if it was like a nested arrays in param of the prototype you are writing then a recursive function will be suitable with aparam the nested array and the length of the parent array.

Sigiloso

26 de fev. de 2015

Used recursive function to do it

1