SpecialCharacter-1

 

JavaScript has lots of special characters like \b,\t, \n, \v, \f, \", \' etc and In this example we will see how to use single quotes and double quotes in JavaScript. See the code snippet:

 
 
 
<!DOCTYPE html> <html> <head> <title>Welcome to LearnKode - A code learning platform</title> </head> <body> <p id="sample"></p> <script> var x = 'It\'s alright'; var y = "Image Path is \"C:\" from the MyComputer."; document.getElementById("sample").innerHTML = x + "<br>" + y; </script> </body> </html>
Output