The JavaScript syntax refers to the rules that define the structure of a JavaScript program.
Syntax: All the JavaScript statements are positioned in the <script> </script> HTML tags in a web page.
var x = 10;
var y = 15;
var total = x + y;
document.write(total);
Yes, JavaScript is a case-sensitive language. This implies that you need to type the keywords, variables, and function names with capital letters.
For instance: You cannot type the getElementById( ) method as getElementBYID().
var myVar = "Introduction to JavaScript"
console.log(myVar);
console.log(MyVar);
console.log(myvar);
When you run the above code, you will get an error message: "Uncaught ReferenceError: MyVar is not defined".