I’m not trying to answer your question, just noticed something that i didn’t get.
How do you push a number onto another number if the last is not an array or in one? so far i learned that you can push an element to an array not to number or a string. Unless when you do that javascript creates an array for them.just guessing.
Thank you.
But he did it only in the if statement not the else statement, so how is the else statement output gonna be ? Will it get outputed in an array automatically?
I see in that code that he is trying to push a value to the function call, does that mean that the function call’s returned value is in an array already?
Hi @zak,
Is always a good idea to remember that an algorithm or solution is different from its implementation.
… Will it get outputed in an array automatically?
… does that mean that the function call’s returned value is in an array already?
… i learned that you can push an element to an array not to number or a string. Unless when you do that javascript creates an array for them.just guessing.
JS(the implementation) uses some abstractions: call stack and nested calls that you need to know to answer your questions.