博客
关于我
解构赋值
阅读量:328 次
发布时间:2019-03-04

本文共 392 字,大约阅读时间需要 1 分钟。

let [a,b]=[1,2];let [foo,[[bar],baz]]=[1,[[2],3]];let [ , , the] = ["foo","bar","baz"];// the = "baz"let [head, ...tail] = [1,2,3,4];// head 1// tail [2,3,4]// 结构赋值允许默认值let [foo=true]=[];

for of便利Map

var map = new Map();
map.set("a", "name");
for (let [key, value] of map) { // 遍历键值对}

输入模块的指定方法

const {     SourceMapConsumer,     SourceNode } = require(source-map);

转载地址:http://yvsh.baihongyu.com/

你可能感兴趣的文章
Netty常见组件二
查看>>
netty底层源码探究:启动流程;EventLoop中的selector、线程、任务队列;监听处理accept、read事件流程;
查看>>
Netty核心模块组件
查看>>
Netty框架的服务端开发中创建EventLoopGroup对象时线程数量源码解析
查看>>
Netty源码—2.Reactor线程模型一
查看>>
Netty源码—4.客户端接入流程一
查看>>
Netty源码—4.客户端接入流程二
查看>>
Netty源码—5.Pipeline和Handler一
查看>>
Netty源码—6.ByteBuf原理二
查看>>
Netty源码—7.ByteBuf原理三
查看>>
Netty源码—7.ByteBuf原理四
查看>>
Netty源码—8.编解码原理二
查看>>
Netty源码解读
查看>>
Netty的Socket编程详解-搭建服务端与客户端并进行数据传输
查看>>
Netty相关
查看>>
Network Dissection:Quantifying Interpretability of Deep Visual Representations(深层视觉表征的量化解释)
查看>>
Network Sniffer and Connection Analyzer
查看>>
NFS共享文件系统搭建
查看>>
ng 指令的自定义、使用
查看>>
nginx + etcd 动态负载均衡实践(二)—— 组件安装
查看>>