8-JAVASCRIPT - Escape character

Publicado el: 22 septiembre 2016
en el 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';


En esta página del sitio puede ver el video en línea 8-JAVASCRIPT - Escape character de Duración hora minuto segunda en buena calidad , que subió el usuario SFPhoria 22 septiembre 2016, comparta el enlace con amigos y conocidos, en youtube este video ya ha sido visto 164 veces y le gustó 0 a los espectadores. Disfruta viendo!