How to use JavaScript Console in codeplayground? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 2

How to use JavaScript Console in codeplayground?

In codeplayground there is JavaScript Console, but when I write in my code console.log (el) in the console window nothing is displayed Tell me, please, how to use this built-in console?

28th Feb 2018, 6:02 PM
Daria Vozdraganova
6 Answers
+ 5
do console.log("hello"); you should have results
28th Feb 2018, 6:17 PM
᠌᠌Brains[Abidemi]
᠌᠌Brains[Abidemi] - avatar
+ 4
https://code.sololearn.com/WyOy0wb7497c/#js ^Works perfectly fine in SoloLearn. That means whatever was being stored in 'el' is your problem, rather than the function itself. Hope that helps.
28th Feb 2018, 6:10 PM
Fata1 Err0r
Fata1 Err0r - avatar
+ 3
I can't answer that then Daria, as that means it's something wrong on your end instead of SoloLearn's. It works fine when I test it from SoloLearn editor and I get the results in both as expected. Considering that you mentioned the browser console, I assume you're also on the Web version of SL, which is what I'm also using. Which browser are you using? That could be the issue also. I haven't tested in other browsers, but it works fine in Chrome.
28th Feb 2018, 6:32 PM
Fata1 Err0r
Fata1 Err0r - avatar
+ 3
@Daria You're more than welcome! I'm happy we got that tracked down for you. Best of luck to you on your studies.
28th Feb 2018, 7:00 PM
Fata1 Err0r
Fata1 Err0r - avatar
+ 2
Displays the "test" only from the browser console, and in the built-in console, I can not see any result. But, if to write for example console.log (abc), then in the built-in I will see "ReferenceError: abc is not defined Line: 7 ". And this is understandable, because there is no such variable. Why do not I see the "test" when I write console.log ("test")?
28th Feb 2018, 6:27 PM
Daria Vozdraganova
+ 2
Yes, you were right, the problem was in the browser. I used the Mozilla Firefox browser. Tried in Chrome and all work correctly. Thanks for the help.
28th Feb 2018, 6:40 PM
Daria Vozdraganova