Javascript output : looks different on different console

why does the output look different here? mozila console shows with back slash where chrome console shows output without back slash ??? anyone please can explain it to me…

Because, chrome and mozila are not the same. There different browser from 2 different company’s so yes there are going to be some differences

is it any major problem?

It shouldn’t really effect your script that hard. It made that difference because Chrome uses the V8 JavaScript Engine, while Firefox uses SpiderMonkey JavaScript Engine. So those engine will react to JavaScript differently, but will still do the same thing, and shouldn’t effect your JS that much. Learn more about

1 Like

the mozilla console may be the more clear here
the backslash are escaping the quotes so that they are not used to start/end a string (notice the differennt in color and the warning for syntax error in last line)

to be able to use the scrimba output in your code you would need to change the outer double quotes to single quotes or manually escape the double quotes inside the string