当前位置:网站首页>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
边栏推荐
- Function recursion and iteration
- Reading redis source code (V) master-slave replication and sentinel mechanism
- Implementing StdevP function of Excel with PHP
- Learning about urldns chains
- The metauniverse is just a cloak for future technological evolution
- Biological psychiatry: defining individualized functional neuroanatomy for precision psychiatry
- Optimization method of live weak network
- How to generate IATA barcode in batch through TXT file
- Operating wechat cache by using wechat low code
- Soft exam information system project manager_ Information system comprehensive testing and management - Senior Information System Project Manager of soft test 027
猜你喜欢

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

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

C language series - Section 4 - arrays

6. template for integer and real number dichotomy

8. greed

Vulnhub DC-5

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
What is sitelock? What is the function?
随机推荐
How to batch make decreasing serial number barcode
Reading redis source code (IV) command request processing flow
Windows system poisoning, SQL Server database file recovery rescue and OA program file recovery
Aikuai multi dialing + load balancing overlay bandwidth
Integrated solution for intelligent supply chain platform management in rubber industry
Canvas draw the clock
Enterprise official website applet building tutorial - solution
Reinforcement learning series (III) -gym introduction and examples
What if the software gets stuck and cannot end the process?
Reinforcement learning series (IV) -policygradient example
51. numerical arrangement
2022-01-30: minimum good base. For a given integer n, if K (k) of n
How PHP uses redis
Related concepts of TTF, TOF, woff and woff2
Section 6: basic configuration I of spingboot
Aiot application innovation competition -- I am the master of my project, and use gn+ninja to complete the system construction (vscode Development)
Applet control version update best practices
Tencent cloud server CVM system tool configuration
Some people are crazy, others are running away, and open source software is both hot and cold
Supervisor multi process management exception automatic restart visual management