1,javascript is a lightweight programming language that is a programming code that can insert HTML pages.
2, start with <script> tag, end with </script> tag.
3, reference the script file with the extension. js in the external file <script src= "Myscript.js" ></script>
4, only Var can be used to declare variables, variables must start with a letter, variable names are case sensitive (Y and y are different variables), and many variables are declared in one statement. The statement starts with VAR and separates the variables with commas.
To re-declare the JavaScript variable, the value of the variable will not be lost, such as var carname= "Volvo"; var Carname; carname's value or Volvo,
A variable that is not declared with a value, whose value is actually undefined such as: the value of the Var carname;carname is actually undefined
You can empty a variable by setting the value of the variable to null.
When declaring a new variable, the keyword "new" can be used to declare its type, var car = new Object;
Assigns a value to a variable that has not been declared, and the variable is automatically declared as a global variable
function
a function is a block of code wrapped in curly braces, preceded by a keyword function:
function functionname () {Here is the code to execute};
1, the keyword function must be lowercase, and the function must be called with the same casing as the function name.
2, not finished, will continue to improve
JavaScript Learning Tutorials