Java script


why does the console giving the output of last line only?why its not executing all lines?.



it is? It just shows the last value to the console, if you want to show more you should use console.log() to manual log everything you want to the console


okes!thanxxx for the answer...


just because nothing is displayed, doesn't mean the code is not running. If there would have been errors in the code, you would see them. If the last value is logged to the console, it means you program ran successfully. That is why it is nice of the codecademy console it logs the last value to the console


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.