8-JAVASCRIPT - Escape character

Publicado em: 22 Setembro 2016
no canal de: SFPhoria
164
0

var stringVar = "This is lokesh gupta's home.";
This can be written as with single quote as well
var stringVar = 'This is lokesh gupta's home';

If interpreter read above line it encounter three single quote and when it reaches reading gupta's it gets confused whether the statement ends or continue and it throws an error. In such situation we can use escape charachter backslash (\) to tread special character (in our case single quote ') as a string. Here is corrected version

var stringVar = 'This is lokesh gupta\'s home';


Nesta página do site você pode assistir ao vídeo on-line 8-JAVASCRIPT - Escape character duração hora minuto segundo em boa qualidade , que foi baixado pelo usuário SFPhoria 22 Setembro 2016, compartilhe o link com seus amigos e conhecidos, no youtube este vídeo já foi visto 164 vezes e gostou 0 espectadores. Boa visualização!