Explanation of javascript expression evaluation
来源:互联网 发布:帝国cms视频 模版 编辑:程序博客网 时间:2024/06/05 14:11
!! typeof “123” === “string”
What value will the above expression be? If you type it on bowser console, you will get a “false”. The question is, why. To figure it out, you must be clear of the operation precedence in javascript. Refer to MDN, we could see the operation precedence list, from highest to lowest.
Therefore, for ‘!! typeof “123” === “string”’, typeof operator get executed first, which return “string”, and not(!) followed, returned true because of double not(!!). Finally, === operator has the lowest precedence in the expression, so it’s executed at last. Obviously true === “string” return false. This is how false come out.
阅读全文
0 0
- Explanation of javascript expression evaluation
- Expression Expression tree Expression evaluation
- Lintcode - Expression Evaluation
- Lintcode - Expression Evaluation
- [LintCode] Expression Evaluation
- Plain Explanation of "memory_order"
- Expression Evaluation(表达式求值)
- Type Conversion in Expression Evaluation
- Explanation of Small World Phenomenon
- Order of evaluation
- Order of Evaluation
- explanation of the summary of linear model
- Breakpoint 4's offset expression evaluation failed.
- sicily 递归练习 1005. Arithmetic Expression Evaluation
- Explanation of UFT-8 and Unicode
- Explanation of error messages from Memcheck
- Explanation of UFT-8 and Unicode
- An Intuitive Explanation of Convolutional Neural Networks
- Struts2_请求参数接收
- 链表面试题(五)---寻找链表的倒数第k个结点O(N)
- java中数组复制的几种常见用法
- Java并发编程(十二)——锁优化
- 线程
- Explanation of javascript expression evaluation
- mysql入门(级联二十二)
- linux内存管理信息buddyinfo和slabinfo和zoneinfo
- HDU.2256 Problem of Precision (矩阵快速幂)
- 让Mac OS X的终端多姿多彩
- 重新定义公司——谷歌是如何运营的
- utf-8 to unicode
- RPM安装MYSql
- Python-使用拾遗