2. While Syntax - prints out "false"


#1



There is no error message, it goes through fine, the only issue is that it prints out "false" below " I'm learning while loops!" The instructions only asks to print"I'm learning while loops!" so I'm just wondering if there is something I'm supposed to do to remove the "false"?


Replace this line with your code.


#2

Not 100% sure of this, but codecademy has a code tester running the background, in some lessons it will print something you didn't specifically tell it to print.

You don't need to remove it, but if you want you can by just posting another console.log() at the end of your code, that will remove it or at least show you when it's the code tester at work.


#3

Well the codecademy editor is just a masked console (which has the advantage that you can learn js without having to bother about the output so far) and consoles have the feature to echo the input value and for longer scripts they echo the last value. So the false is nothing evil but just the echo of the last value. If it seriously bothers you, you can switch its position with the console.log statement as this statement has an undefined value which is therefore not echoed. But as said it's nothing evil.


#4

thanks glad its not evil! :smiley: