Home > Web Front-end > JS Tutorial > Summary of undefined learning in JavaScript_javascript skills

Summary of undefined learning in JavaScript_javascript skills

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-05-16 17:11:24
Original
1001 people have browsed it

When an undeclared variable is used, or a variable that has been declared but not assigned a value is used, or an object property that does not exist is used, this value is returned.

Although undefined and null are not the same, the == operator treats the two as equal, such as

my.prop == null

If the attribute prop does not exist, or it exists but the value is null, then the value of this expression is true.

When an undefined value is used in a boolean environment, it is converted to false, when it is used in a numeric environment, it is converted to NaN, and when it is used in a string environment, it is converted to "undefined"

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
Latest Issues
What are JavaScript hook functions?
From 1970-01-01 08:00:00
0
0
0
What is JavaScript garbage collection?
From 1970-01-01 08:00:00
0
0
0
c++ calls javascript
From 1970-01-01 08:00:00
0
0
0
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template