Basic JavaScript Concepts

Source: Internet
Author: User

JavaScript code is run in the browser and is written in the <script></script> tab.
JavaScript code can be placed in: 1, head part, 2, body part, 3, external script, encapsulated in the. js file, do not need to write <script></script> tag.
JS syntax Features: 1, Case sensitive, 2, weakly typed language, 3, end with a semicolon, 4, string recommended single quotation marks.
Data type: 1, Boolean Boolean type, 2, number digit, 3, string string, 4, undefined undefined, 5, NULL null object, 6, object type.
View variable type typeof (variable name), which returns a string of variable type. Type conversion parse* (variable name).
Sentence: = = The judgment value is equal; = = = Determines whether the type is the same, and then determines whether the value is the same. Non-digital judgment isNaN (); eval () converts a string to JS code execution.
Method Definition: Function method name (argument list) {method body}, first letter of method name is generally lowercase, if return value, use the return keyword in the method body. There is no method overload, and the method that is defined later overrides the method that is defined first. You can use arguments to get all the arguments that are an array.
Anonymous method: Function (argument list) {method body}; You can assign a method to a variable that represents a method.
Scope chain: A variable defined within a method that can be used inside a method and within a sub-method inside a method.

Basic JavaScript Concepts

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.