Am using JS Bin and am just starting to study Javascript. In the book am using the output is shown using console.log(function). That does not show anything, and am being forced to use alert(function) to see the output. Are there any other ways i can see the output in JS Bin. Also where exactly does console.log output it, cos command prompt does not show anything.
Asked
Active
Viewed 3,557 times
0
2 Answers
5
JS bin has a 'Console' Tab, alongside html, css, javascript and output tabs.
Typing console.log in javascript tab displays the output in the console tab.

deadlysyntax
- 183
- 10
-
-
OP asks where console output is displayed - see "Also where exactly does console.log output it" – deadlysyntax Jun 21 '15 at 08:53
-
Right you are @deadlysyntax. It was a part of the question. I got distracted by the title and most of his question. Thanks for correcting me. – Rap Jun 21 '15 at 19:17
2
If you're talking jsBin.com or jsFiddle.com or bootply.com or some other playground, then
document.write('foo=' + foo);
works great. But don't do that in the real world, it is a XSS vulnerability vector.

Rap
- 6,851
- 3
- 50
- 88
'; }` with html `` – Vikrant Apr 08 '15 at 10:47