Learn more about JavaScript

Source: Internet
Author: User
In our projects, especially our web projects, no matter what language you write, java, C #..... javaScript, a front-end scripting language, plays an important role. Next we will take you into JavaScript, explore the mysteries, learn together, and make common progress !... SyntaxHighlighter. all (

In our projects, especially our web projects, no matter what language you write, java, C #..... javaScript, a front-end scripting language, plays an important role. Next we will take you into the JavaScript field, explore the mysteries, learn together, and make common progress !!
1. To understand JavaScript in depth, you must first put down the concepts of objects and classes and return to the source of data and code. As mentioned above, there are only two basic elements in the programming world: Data and code, and these two elements have an ambiguous relationship. JavaScript simplifies data and code to the most primitive level.
2. The data in JavaScript is concise. Simple data only includes undefined, null, boolean, number, and string, and complex data contains only one type, namely, object. The code in JavaScript is only reflected in one form, that is, function. Note: The above words are in lower case. Do not confuse them with JavaScript built-in functions such as Number, String, Object, and Function. You know, JavaScript is case sensitive!
3. Any JavaScript identifier, constant, variable, and parameter is only one of the unfined, null, bool, number, string, object, and function types, that is, the type indicated by the typeof return value. There are no other types.
Eg: var a = 123, typeof (a) ----> number; var B = "123", typeof (B) -----> string; var c = null, typeof (c) ----> object; var d = true
Typeof (d) ---> bool; var e = undefined, typeof (e) ----> undefined; var f = function () {alert (1)}; typeof (f) -----> function
4. JavaScript has no class concept. Only functions are defined by functions. JavaScript Functions are the essence of objects. Function definition method:

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.