0
Chrome doesn't support some JavaScript features?
I'm using Visual Studio Code and Chrome to compile codes. console.log doesn't work when I use it to output a value. It shows a blank screen. It's the same when I use the developer tool. Also escaping characters like \n (new line) and \t (tab) doesn't work either. When I use it in between a string it still outputs the default string without any changes. What could be wrong? I am a beginner in Javascript programming.
7 odpowiedzi
+ 2
Ore It's working in the JS console. Thank you.
+ 1
console.log should work. I think there is an error in your code. Did it give any error?
Browser's ignore all whitespace e.g \n, \t. It will be converted to a single space character.
For an HTML line break, use the <br> tag. For tabs, use the Unicode form,  
+ 1
Most of differences has ms internet explorer. For production‘s code will be needed to know the compatibilities for web browsers.
+ 1
Eddy Ricchy console.log does not print anything to the web page. It logs it's arguments to the JS console.
The JS console is provided by most browsers for debugging purposes. In Chrome you can access the console with Ctrl+Shift+J command. Or simply switch to the console tab in devtools
0
Ore It doesn't give any error. The output of the console.log just doesn't appear on the chrome browser.
0
Eddy Ricchy You are welcome. Mark my answer as best?
0
Ore How do I do that?