当前位置:网站首页>随笔记:重新认识 else if
随笔记:重新认识 else if
2022-06-28 23:43:00 【Run Coder】
随笔记:重新认识 else if
最近来郑州找工作了,在找工作空档期看《你不知道的Javascript 中册》的时候,看到了这个知识点,也让我重新认识了一下。
认识前
原来一直以为 else if 本身就是JavaScript这门语言的语法
就像下面的代码这样
if(1){ }else if(2){ }else{ }
认识后
else if 不是JavaScript这门语言的标准语法,而是社区朋友们根据标准语法自己发明的写法
原因:if 或者 else 后面如果只有一行语句的话,是可以省略花括号的(不推荐这样写 ️ )
非简写模式
if (1) { } else { if (2) { }else{ } }
自己的经验太少,需要学习的地方很多!每一次尝试都是一次收获,加油!
边栏推荐
- Stm32f407 ------- RTC real time clock
- 网上注册股票开户很困难么?在线开户是安全么?
- 入行数字IC验证后会做些什么?
- Online yaml to JSON tool
- At the end of June, how many people in Kangkang are ready to change jobs
- When dialogfragment's onstop is completely invisible, call disass to exit the interface and report an error. Solution
- 【OpenCV】—线性滤波:方框滤波、均值滤波、高斯滤波
- What will be done after digital IC Verification?
- 10. Standard i/o redirection and pipeline
- 解决ConfigParser解析中文问题
猜你喜欢

ctfshow XSS

Analysis of CSRF Cross Site Request Forgery vulnerability

stm32F407-------LCD

Auto encoder

stm32F407-------跑马灯、蜂鸣器
![[state machine design] Moore, Mealy state machine, three-stage, two-stage and one-stage state machine writing specification](/img/48/e29f34aff7cc437bfb574591d54e3d.png)
[state machine design] Moore, Mealy state machine, three-stage, two-stage and one-stage state machine writing specification

note

【软件分析】软件分析、设计与建模迭代式详解
![[数学建模]Matlab非线性规划之fmincon()函数](/img/fc/46949679859b1369fcc83d0d8b637c.png)
[数学建模]Matlab非线性规划之fmincon()函数

Have you ever met a fake interview in a job interview? How to avoid?
随机推荐
Rongyun communication solution solves the pain points of enterprise communication
Behaviortree in ros2
stm32F407-------串行(串口)通信
Counting sorting and stability of sorting
Blue Bridge Cup top ten common heaven level skill - breath of water The type of one recursion
The second session of question swiping and clock out activity -- solving the switching problem with recursion as the background (2)
Scrapy使用xlwt实现将数据以Excel格式导出的Exporter
[API packet capturing in selenium automation] installation and configuration of browsermobproxy
I can't sleep
Is it difficult to register stocks and open accounts online? Is it safe to open an account online?
Auto encoder
入行数字IC验证后会做些什么?
stm32F407-------外部中断
MATLAB 学习笔记(6)MATLAB 的 upsample 函数和 downsample 函数
stm32F407-------LCD
Hesitating root sound
PHP 使用endroid/qrcode 二维码生成, GD库生成分享海报
表单校验问题——el-select(初始化页面自动触发校验解决办法)
stm32F407-------时钟系统(SystemInit时钟初始化、Systick滴答定时器)
Use conditional breakpoints in vscode (based on GDB)