
Welcome back, guys! I hope you are well and having a great day. In today's tutorial, I will discuss the new topic " Basic Syntax and Rules in JavaScript". Learning grammar for a spoken language is necessary before you start writing it. There are rules and regulations you have to follow to write. Similarly, all programming languages have their grammar/syntax and rules which you have to follow in order to execute. Let me show you an example. Alert(“I am learning JavaScript”); This code sample has uppercase "A" and instead of printing the expected "I am learning JavaScript". The error will appear (alert is not defined) and code would not run. So it is important to be careful with syntax. Here are some rules you should keep in mind. alert(“I am learning JavaScript on https://www.theengineeringprojects.com/”); The syntax of comment is similar to CSS. JavaScripts c omments are used to explain or understand the code, and to make it more readable. Suggestions or warnings can help the end-user too. With the help of comment, you can stop code from execution while running or testing alternative code. There are two types of comment in JavaScript. Single line comment represents double slash forward (//). You can use it before and after the code. When you add these two forward slashes (//), all of the code/text to right of them will be ignored. Y ou can see an example in the below picture. The multi-line comment is more convenient than single-line comment, you can use it as a single line ...








