DataType is a very important thing in any programming language because without this computer can't understand what to do with that statement? In this example, we have 5 variable with different values and JavaScript will treat them as string. 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 carName = "Audi A8"; var busName = 'Volvo XC60'; var stat1 = "It's alright"; var stat2 = "He is called 'Johnny'"; var stat3 = 'He is called "Johnny"'; document.getElementById("sample").innerHTML = carName + "<br>" + busName + "<br>" + stat1 + "<br>" + stat2 + "<br>" + stat3; </script> </body> </html>