There are currently no frequently asked questions associated with this exercise – that’s where you come in! You can contribute to this section by offering your own questions, answers, or clarifications on this exercise. Ask or answer a question by clicking reply () below.
If you’ve had an “aha” moment about the concepts, formatting, syntax, or anything else with this exercise, consider sharing those insights! Teaching others and answering their questions is one of the best ways to learn and stay sharp.
Join the Discussion. Help a fellow learner on their journey.
Ask or answer a question about this exercise by clicking reply () below!
Agree with a comment or answer? Like () to up-vote the contribution!
On page 3 of 11, there seems to be a broken image tag. After the sentence “This function call executes the function body, or all of the statements between the curly braces in the function declaration.”, the following appears next to an empty white square: “Function execution diagram”
Thanks for posting the diagram. Mine appears as just an empty square too. I’m using Chrome browser - do you think it could be a browser compatibility issue? How did you get the image to appear?.. or do you have a separate, secret source? )
It worked fine for me on Firefox. But it would help if Codecademy could magnify the image on this exercise and the next. It required some mighty squinting (and zooming in) on my laptop to see everything properly.
This is good, but, this is doing a just a console.log three times, how can i do a comand to repeat the same action three times without need to write it three time? Any function for that?
At this point? From what I’ve read, probably not much difference. If you’re coding enterprise stuff then the for loop might gain you a couple of ticks depending on the compiler.
I don’t think that a while loop is better for the task. I think that, in terms of program efficiency, (speed at runtime), the while loop and the for loop will perform the same.
Also, if you’re declaring i outside of the encompassing function block, (making it global in scope), for either the while or for loop, then you’re not following generally-accepted best practices. The i from neither the for nor while loop should live to see the outside of the function it’s in.