I'm trying to follow the the examples here
http://eloquentjavascript.net/chapter2.html
and
print('blah');
Keeps trying to send to a physical printer when run in a browser. I just want console output.
If you want something simple, the Chrome console will let you run JavaScript on the fly. To print text you can use console.log('blah');
And if you want to print multiple values, you can just list them all out as arguments (no need to concatenate) console.log("a", "b", "c", 1, 2, 3);
You can bring it up with control-shift i
then select the console tab on the far right. And of course FireBug has a similar feature if you're more of a FireFox fan.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With