当前位置:网站首页>6 values in JS are 'false'
6 values in JS are 'false'
2022-06-23 03:01:00 【User 1349575】
1.false( Boolean type );
2.null( Used to define empty or nonexistent references );
3.undefined( Undefined value );
4.0( Numerical type );
5. An empty string ‘’( String type );
6.NaN
In addition to this 6 Outside , Others are “ really ” , Including objects 、 Array 、 Regular 、 Functions, etc . Be careful '0'、'null'、'false'、{}、[] It's all true .
this 6 Values are false , They are not equal
about ‘==’, Come to the conclusion :
false In addition to being compared with oneself true outside , and 0,‘’ The comparison is also true;
null And the only undefined The comparison is true, In turn, undefined Only with null Compared with ture, There is no second ;
0 Except for and false Compared with true, There are also empty strings and empty arrays []
Empty string except and false Compared with true outside , And also 0 Compared with true
边栏推荐
- Build a weather forecast applet using a widget
- Online signature with canvas
- Storage resources revitalize the system and redefine "hyper fusion"
- Markdown - mark above / below symbol (typora, latex)
- Integrate Tencent maps with micro build and low code
- Record a penetration caused by log4j
- CFS topics
- 3. install and deploy Mgr cluster | explain Mgr in simple terms
- The difference between the use of return, break and continue in the if statement in JS
- HTTP cache
猜你喜欢
What is sitelock? What is the function?

8. greed

Soft exam information system project manager_ Contract Law_ Copyright_ Implementation Regulations - Senior Information System Project Manager of soft exam 030

C language series - Section 4 - arrays

Vulnhub DC-5

6. template for integer and real number dichotomy

How to store, manage and view family photos in an orderly manner?

5. concept of ruler method

Soft exam information system project manager_ Information system comprehensive testing and management - Senior Information System Project Manager of soft test 027
随机推荐
"Return index" of live broadcast E-commerce
Goframe framework (RK boot): fast implementation of server-side JWT verification
JS judge the mobile terminal and PC terminal
QUIC or TCP
Summary of website navigation design and website link optimization
Goframe framework (RK boot): Based on cloud native environment, distinguish configuration files (config)
How PHP uses redis
51. numerical arrangement
Deep analysis of time complexity
Essentials of fleet video playback and fleet videoplayer video playback components
The logical operators |, & &!
Optimization method of live weak network
Add other view components to the audio and video components of the applet
CFS After the CHM file is opened, the hyperlink content cannot be loaded and blank is displayed
Methods for MySQL to avoid inserting duplicate records
2022-02-05: the k-th decimal number of dictionary order. Given integers n and K, find 1
CVE-2021-21973 Vmware Vcenter SSRF POC
Use Sakura FRP intranet penetration service to build your own website / game server
2022-01-28: for example, {5, 3, 1, 4} all number pairs are: (5,3), (5,1)
The difference between the use of return, break and continue in the if statement in JS