当前位置:网站首页>for .. of可用于哪些数据的遍历
for .. of可用于哪些数据的遍历
2022-07-27 12:52:00 【友友笔记】
for...of 语句创建一个循环来迭代可迭代的对象。在 ES6 中引入的 for...of 循环,以替代 for...in 和 forEach() ,并支持新的迭代协议。for...of 允许你遍历 Arrays(数组), Strings(字符串), Maps(映射), Sets(集合)等可迭代的数据结构等。
注:不能遍历对象,如果要遍历对象,可以使用for…in来遍历对象。


边栏推荐
- C# FTP增、删、改、查、创建多级目录、自动重连、切换目录
- 插入排序,正序,倒序
- Perfect guide | how to use ODBC for agent free Oracle database monitoring?
- 51: Chapter 5: develop admin management services: 4: develop [add admin account, interface]; (only [user name + password, method]; [@t...] annotation controls transactions; when setting cookies, do yo
- 附加:【URLEncoder.encode(待编码字符串, “编码方式“);】(是什么?;我们向cookie中设置值的时候,为什么要使用这个去编码?)(待完善……)
- Antd's tool function getprefixcls gets the public prefix
- 52:第五章:开发admin管理服务:5:开发【分页查询admin账号列表,接口】;(Swagger的@ApiParam(),对方法参数进行注释;PageHelper分页插件;拦截器拦截检查登录状态)
- Can you tell me the difference between lateinit and lazy in kotlin?
- 【基础知识】~ 集成电路设计流程,以及各阶段所使用的EDA工具
- 16-VMware Horizon 2203 虚拟桌面-Win10 自动桌面池完整克隆专用(十六)
猜你喜欢

How to debug JNI program

面试考点:三种图的问题

面试官常问:如何手撸一个“消息队列”和“延迟消息队列”?

js将数组根据指定属性值分组成二维数组

Classification and application of slip rings

Can you tell me the difference between lateinit and lazy in kotlin?

初探基于OSG+OCC的CAD之任意多个子模型进行netgen以及gmsh网格划分

W3School导航栏练习

leetcode——83,24; Machine learning - neural networks

libevent 之 evconnlistener_new_bind
随机推荐
Will saffron become a safe and effective natural therapy for patients with arthritis?
evutil_make_internal_pipe_: pipe: Too many open files
v-text
绝对定位
Additional: [urlencoder.encode (string to be encoded, "encoding method");] (what is it?; why do we use this to encode when we set values in cookies?) (to be improved...)
纵横靶场-图片的奥秘
面试考点:三种图的问题
uniapp防止连续点击出错
二分法查询数组中的值
以科技传递温度,vivo亮相数字中国建设峰会
JNI程序如何进行参数传递
clearfix的作用
Application of responsibility chain model in transfer accurate valuation
2、Citrix Virtual Apps and Desktops 2203剪贴板重定向策略
W3school navigation bar exercise
固定定位
电滑环的常用类型
Feign client automatic assembly of three clients
SQL group by statement
V-on basic instruction