JavaScript First Knowledge

Source: Internet
Author: User

1, what is JS Object-based and event-driven and has a relatively secure client-side scripting language, developed by Netscape.   2, JS data type  1, basic data type undefined,null,number,boolean,string, 3, value that can be converted to false  0, empty string, NULL, False,undefined 4, value that can be converted to true   non-empty string, true, non-0 digit, obj 5, display conversion, and hermit conversion   Display conversion: Boolean number string    implicit conversion:     1, when a string and a number for the + operation, the value is converted to a string          2, in addition to the + operation, The remaining arithmetic operations are converting a string to a numeric value          3, a comparison between strings, a bitwise comparison of ASCII values of characters          4, string and numeric comparisons, the string is converted to numeric  6, Nan nan is not converted to any numeric value, and is converted to false   not equal to any values  7, some special uses of logical operations  var A = 0| | 5;console.log (a)///Print value 5, when or when the first implicit conversion to a Boolean value is False, the output is the second number  var B = 5| | 0;console.log (b);//Print value 5, when or when the first hermit is converted to a Boolean value of true, the output is the first number  8, the self-increment  1, a++: First use after the  2, ++a: After the use of self-added  9, binary conversion   octal: 0 For example:072  16 binary: 0x do the Mark:0x23    summary 1:  All types of data can be defined with VAR   typeof is used to detect a variable of type   Boolean value only two values  undefined type has only one value, undefined, is mainly used to distinguish whether a variable is undefined or undefined after it is not assigned, the conversion to a value is a representation of nan nUll: A pointer to an empty object, except that the object temporarily does not exist, and the conversion to a numeric value is 0    Summary 2: "",0, null,undefined, nan, false  is automatically converted to false. The others will be converted to true:  empty arrays, objects, function definitions are automatically converted to true.  *,/,-are used only for numeric operations, and when these operators are used with strings, the strings are cast to numbers.  

JavaScript First Knowledge

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.