当前位置:网站首页>Js== mandatory type conversion provisions of operators
Js== mandatory type conversion provisions of operators
2022-07-27 05:41:00 【weixin_ forty-six million fifty-one thousand two hundred and si】
First, judge whether the two types are the same , If it's not the same , Will perform type conversion and then compare , If the same, directly compare
Conversion situation
1) Comparison between strings and numbers , First convert the string to a number and then compare the size
2) Equality comparison between other types and Boolean types , First convert Boolean values to numbers , Apply other rules to compare
3)null and undefined An equal comparison between , The result is true , Other values are compared with them and return false values
4) Equality comparison between objects and non objects , The object will be converted to basic data type first (toString) Then judge
5) If both operation values are objects , Then what they compare is 《 Whether to point to the same object 》, If two operands point to the same object , The equality operator returns true, Otherwise return to false
边栏推荐
- [C language switch branch statement and loop statement]
- Permission display - dynamic list on the left
- 初识C语言——初识指针
- 使用vertical-align不能让图片和文字垂直居中对齐
- Introduction to C language functions
- 软件测试面试题(重点)
- 思考一些文件的作用
- Introduction and management of heap memory in C language
- JS中forEach和map方法有什么区别
- C language string function: strlen, strcpy, strcat
猜你喜欢
![[BJDCTF2020]EasySearch 1](/img/ea/90ac6eab32c28e09bb1fab62b6b140.png)
[BJDCTF2020]EasySearch 1

First knowledge of C language -- constants and variables

布局的搭建及天气预报的显示

「PHP基础知识」PHP中的注释

一本通顺序结构程序设计题解(第一章)

「PHP基础知识」定界符的使用

页面的配置

Program environment and preprocessing (Part 2): define, undef, command line compilation, conditional compilation, file inclusion (super full collation, recommended collection!!!

分享力扣—189.轮转数组 的三种解法

eval与assert执行一句话木马
随机推荐
JS中深拷贝和浅拷贝的区别
进制的特性
JS如何判断一个对象是否属于一个类
User registration login
JS中如何判断一个属性是属于实例对象还是继承于构造函数
Dnsmasq Usage Summary
Page configuration
User management - paging
Time complexity and space complexity
Package JWT
JS中&&(与)和||(或)操作符的返回值
Flask blueprint
set集合
C语言函数入门介绍
JS中arguments类数组
First knowledge of C language -- what is C language
背景图片相关应用-铺满,自适应
C语言指针入门详细介绍
First knowledge of C language - why does every C program have a main function
C language string function: strlen, strcpy, strcat