How would I print something to the result screen in JsFiddle from my JavaScript. I can't use document.write()
, it doesn't allow it, neither print
.
What should I use?
How would I print something to the result screen in JsFiddle from my JavaScript. I can't use document.write()
, it doesn't allow it, neither print
.
What should I use?
Use the
alert()
function:You can do this
--->
http://jsfiddle.net/chY5y/To be able to see output from
console.log()
in JSFiddle, go to External Resources on the left-side panel and add the following link for Firebug:https://getfirebug.com/firebug-lite-debug.js
Might not do what you do, but you can type
And it will print the string into the console of your browser. In chrome push CTRL + SHIFT + J to open the console.
Try:
Fiddle: http://jsfiddle.net/HKhw8/
With ES6 tricks could be
Add only
in HTML