The basic data class number in JavaScript is a double-precision floating-point number, which can represent a maximum security range of plus or minus 9007199254740991, which is 2 of the 53 minus one, input number.max_safe_ in the browser console,
Summary
For now, I just thought of three methods. If you think of other useful methods, You can also talk about them.Description
I. parseInt
1. Instance
(1 ). parseInt ("13 nash"); // 13 (2 ). parseInt ("") // NaN (3 ). parseInt ("0xA"
68 effective ways to write high-quality JS code (i)Get to know the JavaScript version you're usingTips:
Decide which versions of JavaScript your application supports.
Make sure that the features of any JavaScript you use are supported
Article Introduction: a large collection of traps in JavaScript.
This article mainly introduces weird JavaScript, and there is no doubt that it has a weird side. When software developers start using the world's most widely used language
Previous wordsAn important feature of all programming languages is the ability to perform type conversions, and JavaScript provides developers with a number of simple types of conversion methods. JavaScript is a weakly typed language, so type
1, the following expression runs as a result:
["1", "2", "3"].map (parseint)
a.["1", "2", "3"]b.[1,2,3]c.[0,1,2]D. Other2, the following expression runs as a result:
[typeof null, NULL instanceof Object]
A.["Object",
JavaScript Overview The history of JavaScript
1992 Nombas developed the embedded scripting language for C-minus-minus (c--) (originally bundled in Cenvi software). Rename it scriptease. (The language that the client executes)
Netscape (
Basic Concepts
JavaScript is an interpreted language, and the browser acts as an interpreter. When JS executes, it is explained before execution in the same scope. The definitions of function and Var are compiled and then executed from the top down
1. Use = = = instead of = =JavaScript uses 2 different equivalent operators: ===|! = = and ==|! =, it is best practice to use the former in the comparison operation."If the operands on both sides have the same type and value, = = = Returns true,!==
How JavaScript is introducedHow JavaScript is introduced:
1. Write directly in script;
2. Use {#2 import File #} Specifications for JavaScriptSpecifications for JavaScript1. Variables: 0 variables are weakly typed (very casually); 1
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.