Home > Web Front-end > JS Tutorial > body text

Things to pay attention to during javascript development

一个新手
Release: 2017-09-13 10:45:34
Original
1077 people have browsed it

1. Define var
          Octal number (starting with 0). 0xAB: Hexadecimal number (starting with 0X) 3.14e7: Scientific notation (3.14 times 10 raised to the seventh power) 3.14-e7 (3.14 divided by 10 raised to the seventh power)
2.parInt( ) Things to note when converting strings to numbers.
If string starts with "0x", parseInt() will parse the rest of string into hexadecimal integers. If a string begins with 0, ECMAScript v3 allows an implementation of parseInt() to parse the following characters as octal or hexadecimal digits. If string starts with a number from 1 to 9, parseInt() will parse it into a decimal integer.
3. Determine whether it is a non-numeric value.
isNaN(x) x is required. The value to detect.
4. Determine whether the string is empty
                                                                                                                                                                                                                                      trim();
6.firebug
Console.log();
7.javascript does not have block-level scope.

1. Define var

          Octal number (starting with 0). 0xAB: Hexadecimal number (starting with 0X) 3.14e7: Scientific notation (3.14 times 10 raised to the seventh power) 3.14-e7 (3.14 divided by 10 raised to the seventh power)

2.parInt( ) Things to note when converting strings to numbers.
If string starts with "0x", parseInt() will parse the rest of string into hexadecimal integers. If a string begins with 0, ECMAScript v3 allows an implementation of parseInt() to parse the following characters as octal or hexadecimal digits. If string starts with a number from 1 to 9, parseInt() will parse it into a decimal integer.
3. Determine whether it is a non-numeric value.
isNaN(x) x is required. The value to detect.
4. Determine whether the string is empty
                                                                                                                                                                                                                                      trim();
6.firebug
Console.log();
7.javascript does not have block-level scope.

The above is the detailed content of Things to pay attention to during javascript development. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template