JavaScript DOM Programming Art-Learning notes (chap. II)

Source: Internet
Author: User
Tags scalar

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)

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.