当前位置:网站首页>Const defined variables and for of and for in in JS
Const defined variables and for of and for in in JS
2022-06-23 00:55:00 【Love the years Mrx】
1.const The declaration is expressed as a static variable , Attempting to modify will result in an error , And the variables must be initialized when defining .
2. This variable is not allowed to be declared repeatedly
3. His scope is also a block
4.congst The declaration of only applies to variables , If you define an object , Can't change value
5. Out-of-service const Declare iteration variables , Because the iteration variable will increase automatically . But you can state that it won't be modified for Loop variable . This is right for-in and for-of Cycles are particularly meaningful
for-of and for-in difference
1.for-of Will traverse the values of the array , and for-in Only the subscripts of the array will be traversed .
2.for-of It doesn't traverse the prototype chain , and for-in Will traverse the prototype chain .
3.for-of Suitable for traversing arrays or strings , It is not suitable for traversing objects .
边栏推荐
- MySQL-Seconds_ behind_ Master accuracy error
- How about precious metal spot silver?
- a++,++a,!,~
- 數據庫中數據的儲存結構和方式是什麼?
- Is Ruida futures safe? What are the procedures for opening futures accounts? How to reduce the futures commission?
- SAP mm transaction code vl04 create outbound delivery for sto
- SAP UI5 应用开发教程之一百零三 - 如何在 SAP UI5 应用中消费第三方库试读版
- Yyds dry inventory solution sword finger offer: print the binary tree into multiple lines
- 手机上券商开户哪个券商平台更好更安全,如果需要佣金低的怎么办
- 二叉树转字符串及字符串转二叉树
猜你喜欢

層次選擇器

BGP联邦综合实验

JMeter associated login 302 type interface

SAP mm me27 create intra company sto order

最安全的现货白银的心理分析

Steps to implement a container global component
Because I said: volatile is a lightweight synchronized, the interviewer asked me to go back and wait for the notice!

Figure what are the uses and applications of neural networks?

cadence SPB17.4 - 中文UI设置

华为云招募工业智能领域合作伙伴,强力扶持+商业变现
随机推荐
three. JS simulated driving tour art exhibition hall - creating super camera controller
Shell view help
Cadence spb17.4 - Allegro - optimize and specify the polyline connection angle of a single electrical line - polyline to arc
SAP ui5 application development tutorial 103 - how to consume third-party libraries in SAP ui5 applications
SAP mm me27 create intra company sto order
Requête linq
Is it safe to open a new bond? How
How to refine permissions to buttons?
Typecho仿卢松松博客主题模板/科技资讯博客主题模板
Voice network multiplayer video recording and synthesis support offline re recording | Nuggets technology solicitation
JS to read the picture of the clipboard
Because I said: volatile is a lightweight synchronized, the interviewer asked me to go back and wait for the notice!
Tidb monitoring upgrade: a long way to solve panic
How to solve the problem that easycvr does not display the interface when RTMP streaming is used?
a++,++a,!,~
JS image resolution compression
2022 TIANTI match - National Finals rematch
JMeter associated login 302 type interface
[22 summer reconstruction 1] codeworks round 791 (Div. 2)
【机器学习-西瓜书】更文挑战【Day1】:1.1 引言