13

Using JS Fiddle how do I display the result of console.log. I'm teaching a class, for free, and I'd like to give me students a place where they can go and run:

console.log('foo');

I want them to be able to see the results of the .log().

0

3 Answers 3

16
  • click on that arrow next to JavaScript
  • and as FRAMEWORKS & EXTENSIONS select No-Libary (Pure JS)
  • paste your console.log('foo'); in JS box
  • under Resources add https://rawgit.com/eu81273/jsfiddle-console/master/console.js
  • and run your script hitting that Play button

9
  • That shows it in the dev console, not in the HTML results. Jul 16, 2018 at 18:34
  • @EvanCarroll I'm confused. Are you saying that you want to see the result of console.log on the HTML results? Jul 16, 2018 at 18:44
  • 1
    @Rubén yes. The purpose of JSFiddle is to be a web-based javascript IDE. Jul 16, 2018 at 18:45
  • For me, console.log does not work like this in jsfiddle it shows up in dev console. Jul 16, 2018 at 18:45
  • 1
    Oh, I see now you're adding https://rawgit.com/eu81273/jsfiddle-console/master/console.js into the mix in your last edit. Jul 16, 2018 at 18:55
1

Use the console of your web browser.

If you are using Chrome for Windows press Ctrl + Shift + J

For other alternatives checkout How to get console inside jsfiddle

0
0

I thought I was going crazy because my console.log wasn't outputting anything to Chrome's developer console. Then I realized that I had left "Info" type levels unchecked. As soon as I rechecked that, console.log informational output starting showing up in the console. :facepalm

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.