JavaScript Language Pristine Learning notes 1th/2 page _javascript tips

Source: Internet
Author: User
Very good ideas include functions, weak types, dynamic objects, and an expressive representation of the literal volume of an object,
Bad ideas include a programming model based on global variables.

JavaScript functions are top-level objects based on lexical scopes. JavaScript is the first lambda language to become a mainstream. JavaScript is more common to Lisp and scheme than Java. It's a lisp with a C coat. This makes JavaScript a very powerful language.

Now most of the language has become popular requiring strong typing. The principle is that a strong type allows the compiler to check for errors at compile time. The sooner we check and fix bugs, the less we pay. Javascipt is a weakly typed language, so the JavaScript compiler cannot detect a type error. It turns out that strong typing doesn't make your test work easy, and the other is that the weak type is free. No need to build a complex class level, do not have to do forced modeling.

JavaScript has a very powerful literal notation. By listing the components of an object, they can be simply created. This notation is the inspiration that prompted me to create the popular data Interchange Format--json.

JavaScript relies on global variables to connect, and all top-level variables of all compilation units are set up in a common namespace called global objects. This is a bad thing, because global variables are demons, and they are fundamental in JavaScript.
javascript reserved words:
Copy Code code as follows:

Abstract
Boolean Break byte
Case catch Char class const continue
Debugger Default Delete do double
Esle Enum Export extends
False final finally float for function
Goto
If implements import in Instanceof int interface
Long
Native New null
Package private protected public
Return
Short static Super switch synchronized
This throw throws transient true try TypeOf
var volatile void
While with

Current 1/2 page 12 Next read the full text
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.