JS Basics
Usage of 1.JS:
Scripts in HTML must be located between <script></script> tags
The script microloops is placed in the <body> and 2.JS Label
Inserting JS in HTML, using <script> tags
Write code between <script></script>
3.JS Usage Limits
In HTML, the number of scripts is not limited
Scripts are usually placed in the Document.writ () Output statement
JS syntax
1.JS statement:
The command that the JS statement sends to the browser. The purpose of the statement is to tell the browser what to do.
2. Semicolon:
The split between statements is a semicolon (;)
Note: Semicolons are optional, and sometimes you see not separated by semicolons.
3.JS Code:
Execute sequentially in the order in which they were written
4. Identifiers
JS identifiers must start with a letter, underscore, or dollar sign
JS key cannot be used as an identifier
5.JS Case Sensitive
JS is also sensitive to case
6. Spaces
JS will ignore the extra space
7. Notes
Multi-line Comment/**/
Single-line comment//
JS variable
1. Variables are "containers" for storing information
Cases:
var x = 10;
var y = 10.1;
var z = "Hello";
JAVA Web JS