The switch statement of JavaScript
来源:互联网 发布:vb上视频教程全集 编辑:程序博客网 时间:2024/06/05 00:19
The struct of switch statement is as follows:
switch (expression) { case value1: //Statements executed when the result of expression matches value1 [break;] case value2: //Statements executed when the result of expression matches value2 [break;] ... case valueN: //Statements executed when the result of expression matches valueN [break;] default: //Statements executed when none of the values match the value of the expression [break;]}
The function evaluate expression and get value from each case value or expression.When the result of expression matches one of them,Statements following this value executed.
**Attention!
The result of expression uses === to match value!
The result of expression uses === to match value!
The result of expression uses === to match value!
Important things need to repeat three times. :-)
For more information,see ECMA-262, 3rd edition.
0 0
- The switch statement of JavaScript
- JavaScript学习笔记-- The switch Statement
- Using the Switch Statement
- Intro:The switch-case statement in php
- Variable initialization in the switch statement
- Statement of the Honorable Mary Sheila Gall
- Processing Order of the SELECT statement
- Refactoring a Switch Statement
- switch引发的错误 a label can only be part of a statement and a declaration is not a statement
- switch引发的错误:a label can only be part of a statement and a declaration is not a statement
- switch 错误:a label can only be part of a statement and a declaration is not a statement
- switch引发的错误 a label can only be part of a statement and a declaration is not a statement
- switch引发的错误 a label can only be part of a statement and a declaration is not a statement
- the future of JavaScript
- INTERNET SOCIETY STATEMENT ON THE DEATH OF JON POSTEL
- statement by the president on thepassing of steve jobs
- What are the benefits of PreparedStatement over Statement
- How to switch off the automatic assignment of employee relationship
- LeetCode 124 Binary Tree Maximum Path Sum (树的直径 DFS 推荐)
- .html,.htm和.shtml的区别
- 大数据IMF传奇行动绝密课程第53课:Spark性能优化第九季 Spark Tungsten内存使用彻底解密
- 13,多文件编程
- 量化策略一般用什么平台回测,分别有什么优劣势
- The switch statement of JavaScript
- ubuntu下Android反编译详细教程-apktool,dex2jar,jd-gui的使用
- 根据先序,中序重建二叉树
- lua数据结构之table的内部实现
- Qt学习之二:创建对话框
- cocos2d-x Label不同文字不同颜色
- androidr图片压缩和保存本地
- gggg
- TQ210 —— 点亮LED