Home > Backend Development > PHP Tutorial > 一段代码求理解,多谢

一段代码求理解,多谢

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-13 11:47:27
Original
886 people have browsed it

一段代码求理解,谢谢
"10" == "1e1" //true
100 == "1e2" //true
结果是true 何解,谢谢
------解决方案--------------------
弱类型跟你前面的 第一个比较为 true 无异
如果要寻求你内心的答案

100==='1e2' //false


------解决方案--------------------
1e2
科学计数法,表示10的2次方,即100

100 == "1e2" --> 100 == 100

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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template