to assign values to a variable in the three browsers of IE, Chrome, and FF on my computer. However, in the strict mode of ECMASCRIPT6, the octal direct volume is expressly forbidden.There are two types of floating-point direct quantities. ① traditional Real number notation: There is an integer part, a decimal point and a fractional component; ② Index counting method: That is, the real numbers followed by the letter E or E, followed by the sign, followed by an integer index. Overflow of 2.1.1
999999999999999; // x is 999999999999999 var 9999999999999999; // y is 10000000000000000The maximum number of decimal digits is 17, but the floating-point operation is not always 100% accurate:var 0.2+0.1// output is 0.300000000000000041.4 Octal and hexadecimalIf the prefix is 0, JavaScript interprets numeric constants as octal numbers, and if the prefixes are 0 and "X", they are interpreted as hexadecimal numbers.var 0377 var0xFF;By default, JavaScript numbers are displayed in decimal.But
Bits (0-51)
Bits (50-62)
1 bit (63)
PrecisionIntegers (not using decimal or exponential notation) are up to 15 bits.The maximum number of decimal digits is 17, but the floating-point operation is not always 100% accurate:instance var x = 0.2+0.1; Result would be 0.30000000000000004Try it»
Octal and hexadecimalIf the prefix is 0, JavaScript interprets numeric constants as octal numbers, and if the prefixes are 0 and "X", they are interpreted as he
executing the internal statements in parenthesesConsole.info ('empty ');}If (new Boolean (empty) {// create an object first, and then implicitly convert it to true. The statement in parentheses is executed.Console.info ('empty'); // empty}Console.info (typeof true = 'boolean'); // trueConsole.info (+ true); // 1, unary operator, converted to a value of 1Console.info (+ false); // 0Console.info (''+ true); // true, + operator after overload, converted to string 'true'Lele.info (''+ false); // fa
JavaScript can use the octal representation of Integers (prefixed with numbers 0 ), I use octal to assign values to a variable in IE, Chrome, and FF browsers on my computer. However, in the strict mode of ECMAScript6, the direct quantity of octal nodes is explicitly prohibited.
There are two writing methods for the floating point type direct volume. ① Traditional real number Writing: it consists of an integer, a decimal point, and a decimal point. ② exponential counting: that is, the real numbe
conversion function for SQL
2) Support segmented paging (page, page_ping, Ping, ping_size), traditional paging (page, page_size), original paging (Offset-count), since_id paging (prev_id, next_id)
3) Segmented paging, traditional paging, the original paging is converted to the original paging processing at the bottom of the page
5. Implementation definition
Ping_to_offset
Input:
page# Request page number, range: [1, Total_page], over range with bounds, i.e. 0 fixed to 1, Total_page + 1 fixed to
"undefined"2. NullThere is also only one value, for null , to typeof(null) return ‘object‘ .3. BooleanTwo values, true and a false . All other types of values can be converted to or from a Boolean (variable) true false . Conversion rules:
Data type
true
false
String
Non-empty string
Empty string ( ‘‘ )
Number
Non-0 value
0AndNaN
Object
Any object
null
Undefined
)
PrecisionInteger (no decimal point or exponential count method) is up to 15 digits.The maximum number of decimal digits is 17, but floating-point operations are not always 100% accurate:Instance
var x = 0.2+0.1; Result would be 0.30000000000000004
octal and hexadecimalIf the prefix is 0, JavaScript interprets numeric constants as octal numbers, and if the prefix is 0 and "X", it is interpreted as a hexadecimal number.Instance
var y = 0377;
var z = 0xFF;
Lamp sho
, programmers are even allowed to construct NaN values with special locating modes (through the Float. intBitsToFloat () method ). For example, programmers can use this customized special location mode in NaN values to express some diagnostic information.Like NaN, the infinite exponent portion of the special value is also 128, but the infinite ending number must all be 0. Infinity is used to express the Overflow problem in computing. For example, when
ECMAScript have values equivalent to these two Boolean values. To convert a value to its corresponding Boolean value, you can call the Transform function Boolean (), for example:var str1= "HI";var strboolean=boolean (STR1);Console.log (Strboolean);//trueYou can call the Boolean () function on a value of any data type, and always return a Boolean value.Various data types and their corresponding conversion rules:
Data type
The value converted to true
Value converted to F
, after the decimal point contains at least one digitvar floatnum=1. -----There is no number after the decimal point, it is resolved to 1var floatnum=11.0------Integer, resolved to 11For large and very small values can be represented by the expression of the floating point in the E-notation, the value of e is equal to the value in front of e multiplied by the exponential power of 10B: The value range, ECMAScript can be represented by the smallest value saved in Number.min_value, in most of the b
1. Using "Use strict" on the top of the script or in the first line of the function will enable strict mode or execute in strict mode2. Define the variable that holds the object and initialize it to null3.null = = Underfined,is true;4.typeof Null,is object;5.typeof is operator, not operand6. When calculating, octal number (starting with 0, if written as 079, then decimal 79), and hexadecimal number (0x), will be converted to decimal7.0.1 + 0.2 = = 0.3,is false; Do not test a specific floating-po
interpreted as hexadecimal numbers.Instancevar y = 0377;var z = 0xFF;Never write 0 in front of the number unless you need to make an octal conversion.By default, JavaScript numbers are displayed in decimal.But you can use the ToString () method to output 16 binary, 8 binary, and 2 binary.Instancevar mynumber=128;Mynumber.tostring (16); Returns 80Mynumber.tostring (8); Returns 200Mynumber.tostring (2); Returns 10000000Infinity (Infinity)When the resul
of customer calls tracking cases, through this case you can probably understand the basic principle of customer call tracking.
For some non-transactional business sites, telephone contact is still an important call to Action. However, we rarely count the user's caller data, even though we have data collected from the caller, which is isolated, and cannot be integrated into the Web Analytics report as a transformation or goal. A number of call tracking vendors have begun to address this problem
when they are coerced by a Boolean () type conversionBoth 4:null and undefined do not have the ToString () function.(4) when a Boolean () coercion type is cast, false, "", 0,nan,null,undefined will be converted to false, and the others will be converted to true(5) Number type1: Because the memory space required to save the floating-point value is twice times the integer value, JS automatically converts the floating-point number to the integer type (if possible)2:js in the floating-point operati
words is not OH)"The text between the two slashes forms a direct amount of a regular expression.Direct volume (Regular direct volume, object direct volume, number, string ...) If you are not assigned to a variable, you can use it only once.Solution for rounding Errors: use integer "Points" instead of fractional "tuples" for currency unit-based operations. --P38 (operation in more precise units)Binary floating-point notation does not accurately represent simple numbers like 0.1. --p37Except as a
Beyond the Turing Machine (II)-mysterious and infinite
Infinite infinity is mysterious.
(1) introduction to the theory of Taiji infinity:
Only two Infinity,1. Number of Natural Numbers: A few infinity (∞ 0 ),2. Real Number: Infinite (∞ 1 ),∞ 1 is the ultimate big.
There are countless numbers distributed between ∞ 0 and
1 digit
Numbers are one of the basic data types in javascript. javascript does not distinguish integer and floating-point values. Javascript uses the 64-bit floating format defined in the IEEE 754 standard, basically similar to the double type in Java.
Javascript supports direct numeric values: integer values, octal and hexadecimal values, and floating point values.
2. Number object
Number object, which is the packaging object of the original value. When necessary, JavaScript will automatically
; Maximum number of extended7) Mincomp = -9.223372036854775807e+18; Minimum comp number8) Maxcomp = 9.223372036854775807e+18; Max Comp numberThe following constants should not be used for comparison relationships, only for allocation. Use the isNaN and isinfinity functions to compare relationships. (provided at the back)9) NaN = 0.0/0.0; Non-number (* $EXTERNALSYM nan*) (* $HPPEMIT ' static const Extended NaN = 0.0/0.0; ' *)Ten) Infinity = 1.0/0.0; Po
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.