JavaScript Advanced Programming Reading notes

Source: Internet
Author: User

Floating-point numbers, while highly accurate, may be less accurate than integers in real-world calculations. For example, 0.1+0.2 is not equal to 0.3, but 0.3000000000000004, so the calculation of floating-point numbers as a judgment condition will produce errors, which is based on IEEE754 data floating point calculation of the common problem, JS number of the scope of the expression is also limited, if more than Number.MAX _value or less than Number.min_value, the data is (+/-) Infinity and can be judged by the function isinfinity.
Octal is not valid in strict mode.
IsNaN () can be used to detect the return value of an object, first call the object's valueof () method, check its return value IsNaN, not the return value of the method with ToString, and then check the return value.
Number (), complex, possibly unreasonable
parseint (), first not a numeric character, returns Nan, and thereafter encounters the first non-numeric character discarded, as far as possible without octal digits, the second parameter specifies the conversion of a binary
Parsefloat ()
Unary operator Self-subtraction converts a character type Boolean to a number
Unary operators +/-also have these functions
Add + turns into a string before applying the rule
For in is a precise iterative statement that enumerates the properties of an object, but if the property value to iterate over is null or undefined, the error or stop loop
A label statement that is typically used with a looping statement
The With statement confines the object of the code to a specific object. With in strict mode
Methods cannot be overloaded because parameters are not deterministic and cannot be distinguished by parameter types and numbers like Java
Functions do not have a function signature and can be accessed by arguments objects, and any function may return a return value of any type at any time, and a function that does not actually return a value returns undifined
Function signature: That is, the function declares something except the function name, including the parameter order, the parameter type, the number of parameters. (may contain return values)

JavaScript Advanced Programming Reading notes

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.