JS variable names can consist of _, number, letter, $, and cannot start with a number. A global variable of $ is defined in JQuery.
Declaring variables with var variable names, if not Var, will contaminate the global.
JS variable types include:
① Numeric type
② String Type
③ Boolean type (True,false)
④ Null type
var a = null
Object type not defined: null
var c = {Name:dee, age:29}//Object type
Console.log (C.name);
Console.log (c[' name ');
⑤ undefined type
var b = undefined;
Primitive types (numeric, string) are not defined: undefined
For example: Find a P tag on the DOM and return null (because the DOM is interpreted as a rendered object in the browser)
⑥ Array type (the array's keys increment from 0, and if a pair of key values is deleted, the index of the array is immediately rearranged)
var arr = [' A ', 1,true];
Console.log (arr);
Console.log (arr[2]);
JavaScript notes and Summary (2-2) JavaScript variables