for...of 和f or..in

for…of

for…of会遍历可迭代的对象,不可迭代对象,调用对象上的Symbol.iterator方法
可迭代的对象包括:Array、Map、Set、String、TypedArray、arguments等

let someArray = [1, "string", false];

for (let entry of someArray) {
    console.log(entry); // 1, "string", false
}

for…of 和 for…in语句

for…in 迭代的是对象的的列表,for…of 则迭代对象的键对应的
for …in 是key,for of 是value

let list = [4, 5, 6];

for (let i in list) {
    console.log(i); // "0", "1", "2",
}

for (let i of list) {
    console.log(i); // "4", "5", "6"
}
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
hex2bin v2.2, Copyrhex2bin v2.2, Copyright (C) 2015 Jacques Pelletier & contributorsight (C) 2015 Jacques Pelletier & contributors usage: hex2bin [OPTIONS] filename Options: -a Address Alignment Word (hex2bin only) -b Batch mode: exits if specified file doesn't exist -c Enable record checksum verification -C [Poly][Init][RefIn][RefOut][XorOut] CRC parameters -e [ext] Output filename extension (without the dot) -E [0|1] Endian for checksum/CRC, 0: little, 1: big -f [address] Address of check result to write -F [address] [value] Address and value to force -k [0-4] Select check method (checksum or CRC) and size -d display list of check methods/value size -l [length] Maximal Length (Starting address + Length -1 is Max Address) File will be filled with Pattern until Max Address is reached -m [size] Minimum Block Size File Size Dimension will be a multiple of Minimum block size File will be filled with Pattern Length must be a power of 2 in hexadecimal [see -l option] Attention this option is STRONGER than Maximal Length -p [value] Pad-byte value in hex (default: ff) -r [start] [end] Range to compute checksum over (default is min and max addresses) -s [address] Starting address in hex for binary file (default: 0) ex.: if the first record is :nn010000ddddd... the data supposed to be stored at 0100 will start at 0000 in the binary file. Specifying this starting address will put pad bytes in the binary file so that the data supposed to be stored at 0100 will start at the same address in the binary file. -v Verbose messages for debugging purposes -w Swap wordwise (low <-> high)
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值