1. A good habit to add a semicolon from the end;
2.js Case Sensitive
3. The universal naming law of the program community: ① numbers, letters, underscores, dollar signs that start with numbers
② advocates for naming variables with the following underlined nomenclature, named functions using the Hump naming method. But in the company will often involuntarily. It's just a good habit.
4. Data type: ① scalar: (Numeric, String, Boolean)-scalar, can have only one value at any time.
② collection: (array [indexed array, associative array], object)
5. Gossip Boolean value: The ultimate principle of electronic devices: 0 and 1. They are far simpler than the heart, 0 is 0, 1 is 1. Wouldn't say yes? 0 contains 1, 1 contains a philosophy of life like 1.
* 6. in JS, all variables are objects of a certain data type. (such as a Boolean is an object of type Boolean)
*7. The true power of functions is in terms of efficient reuse and type use:
1 function Count (A, b) {2 return a + b; 3 }4 console.log (Count)5 Console.log (count (2,2))
8.js is an explanatory, weak type of language.
① explanatory-A good example: I go to translate English, I am an interpreter. To interpret English as Chinese
② Weak type-you do not have to explicitly declare the data type.
**9. Basic idea: JS provides many built-in functions (such as alert,console, etc.), built-in objects (provided by the JS language itself, such as math, etc.), and host objects (provided by JS's running environment-browser, such as window, etc.). Custom functions and Object Services are also available.
Angularjs also provides services such as built-in directives, built-in services, and support for custom services.
JavaScript DOM Programming Art-Learning notes (chap. II)