+ 1
why this gives 's as output?
var str = '\' ' +'s' console.log(str) //output is 's
1 Odpowiedź
+ 3
You might ask why \ was not in output?
It's because \ is a special character used to escape some characters, when \ escapes any character, it will not be printed. If you want to print \, you need to escape it's self by another blackslash, \\