Home  >  Article  >  Web Front-end  >  Is javascript an event driven language?

Is javascript an event driven language?

醉折花枝作酒筹
醉折花枝作酒筹Original
2021-07-15 11:41:513611browse

JavaScript is an object- and event-driven scripting language with security features. Basic features: object-based language, simplicity, security, dynamicity, cross-platform, a scripting language, and an interpreted language.

Is javascript an event driven language?

The operating environment of this tutorial: windows7 system, javascript version 1.8.5, Dell G3 computer.

JavaScript is an object- and event-driven scripting language with security capabilities

Basic features: object-based language, simplicity, security, dynamics, cross-platform It is a scripting language and an interpreted language (without compilation, directly interpreted and executed by the browser)

Use the typeof operator to judge

NaN--not a number, that is, not a numerical value a. NaN is used to indicate that an operand that is supposed to return a value does not return a value; b. Any operation involving NaN will return NaN; c. NaN is not equal to any value, including NaN itself, and returns false

isNaN function - determine whether a value is a numeric value

If it is a numeric value, return itself, if it is null, return 0, if it is undefined, return NaN, if it is a string, follow the following rules:

 --If the string contains only numbers, convert it to decimal (ignoring leading 0)

 --If the string contains a valid floating point format, convert it to Floating point value (leading 0 is ignored) --If it is an empty string, convert it to 0

 --If the string contains a format other than the above, convert it to NaN

If it is an object, call the object's valueOf method, and then convert the returned value according to the previous rules. If the result of the conversion is NaN, call the object's toString method and convert the returned string value again according to the previous rules.

 parseInt- Convert a string to an integer type value. The rules are as follows: Ignore the spaces in front of the string until the first non-empty character is found. If the first character is not a numeric symbol or a negative sign, return NaN, if the first character is a number, continue parsing until the string parsing is completed or a non-numeric symbol is encountered. If the result of the previous parsing starts with 0, it will be parsed as octal; if it starts with 0x , it will be parsed as hexadecimal.

[Recommended learning: javascript advanced tutorial]

The above is the detailed content of Is javascript an event driven language?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
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