JavaScript Learning Notes (ii)

Source: Internet
Author: User
Tags bitwise bitwise operators

Chapter III study One, variableTo use the var operator when defining a variable, each variable is simply a placeholder for holding the value. Note: Variables defined with VAR can be changed to local variables ii. Types of data1. Five simple data types, also known as basic data types: Undefined, Null, Boolean, number, and string. There is also a complex data type Object2, typeof is used to detect the data type of a given variable 3, when defined by VAR, the variable is not initialized, the value of the variable is UNDEFINED4, null value represents an empty object pointer 5, The Boolean type has only two literals: true and False to convert a value to its corresponding Boolean value, you can call the Transform function Boolean () to have a transform rule 6 that represents the conversion of various data types to a Boolean type. There are four points to remember in number: (a) floating-point value, the popular point is the decimal (two) range of values: to determine whether a value is poor, You can use the Isfinite () (c) NaN: A value that is used to indicate that an operand that is intended to return a number does not return a numeric value (four) there are 3 functions that convert a non-numeric value to a value: number (), parseint () and parsefloat () number () can be used for any data type, and the other two functions are specifically used to convert a string to a value of 7, String type (a) character literal the string data type contains some special character literals (that is, some special symbols) (b) The character of the string cannot be changed once it is created. To change, first destroy the original string, And then using another to contain the new worthy string to fill (iii) to convert a value into a string there are two ways to do this: the first is to take advantage of ToString () note, null and undefined do not have this method the second is to use string () various values can go 8, Object Type objects are actually a collection of data and functions remember a thought: in ECMAScript, the object type is the basis of all its instances (the object type has any properties and methods that also exist in more specific objects) Three, operator Action: A set of operators for manipulating data values, including arithmetic operators, bitwise operators, relational operators and equality operators 1, unary operators + + and--(increment and decrement operators) 2, unary plus and minus operators 3, bitwise operators (bits in memory that represent numeric values) Note the operation of negative numbers (a) bitwise non ~ (b) Bitwise AND and (c) bitwise OR OR (iv) bitwise XOR (v) shift left (VI) signed right SHIFT (vii) unsigned right SHIFT 4, Boolean operator a total of three: non (not), with (and) and or (or) (        A) logical non (two) logic with (three) logic or 5, multiplicative operator (a) multiplication * (ii) Division (rounding/) (for remainder) 6, additive operator (i) addition (two) subtraction 7, relational operators (>, <, <=, >=) 8, equal operation typeface (= =) are not equal (!). =) congruent (= = =) Not congruent (!) = =) 9, conditional operator a= (b>e)? B:e if B is greater than E, assign the value of B to a if B is less than E, then assign the value of E to a iv. Statements 1, if Statement 2, Do-while statement 3, while Statement 4, for statement 5, for-in statement for (A in B) statement each time a loop is executed, a property name that exists in B is assigned to the variable until no property name in B is 6, and the label statement is preprogrammed , waiting for future use, the statement that the break statement and the break statement and the continue statement will be referenced by break and continue in the future immediately jump out of the loop to force the execution of the statements after the loop continue statement, although it also immediately jumps out of the loop, But after jumping out of the loop will continue to execute from the top of the Loop 8, switch for multi-conditional judgment, with default: To judge no longer in the situation (in fact, is an end condition, you do not have this number, then I judge the end of the program) Five, function   vi.. Parameters        Seven, no overloading

JavaScript Learning Notes (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.