当前位置:网站首页>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 .
边栏推荐
- Flowable global listener monitors the start and end of a process
- Webdriver and selenium Usage Summary
- TiDB VS MySQL
- SAP mm me27 create intra company sto order
- cadence SPB17.4 - allegro - 优化指定单条电气线折线连接角度 - 折线转圆弧
- Analysis on the wallet system architecture of Baidu trading platform
- SAP MM 事务代码VL04为STO创建外向交货单
- Quelle est la structure et la façon dont les données sont stockées dans la base de données?
- How do beginners get started quickly and learn deeply?
- Which brokerage platform is better and safer for a brokerage to open an account on a mobile phone? What if you need a low commission
猜你喜欢

Installing MySQL for Linux

How to calculate the position of gold ETF

cadence SPB17.4 - allegro - 优化指定单条电气线折线连接角度 - 折线转圆弧

SAP UI5 应用开发教程之一百零二 - SAP UI5 应用的打印(Print)功能实现详解试读版

Local deployment and problem solving of IIS in ArcGIS JS 4.23

07 project cost management

Introduction to the use of opencvsharp (C openCV) wechat QRcode decoding function (with source code attached)

OSPF experiment in mGRE environment

I've been outsourcing for four years, but I feel it's useless

Webdriver and selenium Usage Summary
随机推荐
Add / get and delete cookies
three. JS simulated driving tour art exhibition hall - creating super camera controller
SAP UI5 应用开发教程之一百零二 - SAP UI5 应用的打印(Print)功能实现详解试读版
百度交易中台之钱包系统架构浅析
中国国际期货有限公司怎么样,是正规的期货公司吗?网上开户安全吗?
New paradigm of semantic segmentation! Structtoken: Rethinking the per pixel classification paradigm
3 big questions! Redis cache exceptions and handling scheme summary
Get the start and end dates of the current week
Voice network multiplayer video recording and synthesis support offline re recording | Nuggets technology solicitation
62. 不同路径
SwiftUI Swift 教程之 14 个有用的数组运算符
Graphite statsd interface data format description
OSPF comprehensive experiment
最安全的现货白银的心理分析
通过天天基金投资基金安全吗?我打算开户买基金
Which platform is safer to buy stocks on?
TIDB监控升级解决panic的漫漫探索之路
Daily question brushing record (I)
因为我说:volatile 是轻量级的 synchronized,面试官让我回去等通知!
LINQ query