Comments and Syntax Programming

JavaScript – Comments and Syntax

  • September 30, 2020
  • 0 Comments

Comments in JavaScript Normally in JavaScript, the comments are treated as text between //. Multiple line comments are treated as the text between /* and */ Comments are required to make code understandable, we don’t have to think we are not only the coder, programmer & expert. If another engineer or developer check any part […]

Variables, Naming Rules, and Syntax Programming

JavaScript – Variables, Naming Rules, and Syntax

  • September 30, 2020
  • 0 Comments

Variables and Naming Rules Variables can be used to hold values [e.g.: (x=10) or expression (a=b+c)].  Can have short names (like x and y) or more descriptive names (age, sum total volume)  Declared using the keyword var.  Rule For Naming Variables Names must begin with a letter.  Names can also begin with $ and _.  […]

JavaScript in Head and Body Programming

JavaScript – JavaScript in Head and Body Tag

  • September 30, 2020
  • 0 Comments

JavaScript can be written inside both the <head> section and <body> section. Sometimes we need to write the JavaScript code in both sections to better understand or calling the different functions. While writing JavaScript code <head> and <body> sections we have to use <script> tag for both. Here you can see an example where I […]

JavaScript inside Body Tag Programming

JavaScript – Put JavaScript inside Body Tag

  • September 30, 2020
  • 0 Comments

JavaScript code can be placed inside the <body> and </body> tag of the HTML document. Using JavaScript code in the body section will be better for the loading of the web page or HTML document. We can put JavaScript code in the <head> section also but that will take more time to load the webpage. […]