宝丁

Results 31 comments of 宝丁
trafficstars

请问一下,源码是指node libuv的源码嘛?

# 函数 ## 默认参数 ``` function es6_func(arg1, arg2 = 'default1', arg3 = 'default2') { // ... } ``` Babel后的代码为 ``` 'use strict'; function es6_func(arg1) { // ... var arg2 =...

``` /**********************使能非阻塞I/O******************** *int flags; *if(flags = fcntl(fd, F_GETFL, 0) < 0) *{ * perror("fcntl"); * return -1; *} *flags |= O_NONBLOCK; *if(fcntl(fd, F_SETFL, flags) < 0) *{ * perror("fcntl"); *...

# 块级作用域绑定 ## 块级声明 块级声明用于声明在指定块的作用域之外无法访问的变量,块级作用域(词法作用域)存在于 * 函数内部 * 块中({ }之间的区域) ## 禁止重命名 假设作用域中已经存在某个标识符,此时再使用let关键字声明它就会抛出异常 ``` var count = 10; if(condition) { let count = 20; // 不会报错 } ``` ## const...

# 函数 ## ES6中的默认参数值 在ES5中,给函数传默认参数值的方式是: ``` function es5_func(arg1, arg2, arg3) { arg2 = (typeof arg2 !== 'undefined') ? arg2 : 'default1'; arg3 = (typeof arg3 !== 'undefined') ? arg3 :...

@liutao 谢谢!

@JLraining 今天搞!昨天没开机

![image](https://user-images.githubusercontent.com/9164818/28396595-0dfc35f4-6d2f-11e7-9231-5194aa657c1d.png) ![image](https://user-images.githubusercontent.com/9164818/28396603-15be8bde-6d2f-11e7-8d83-b2ab0e1b85b5.png)

https://github.com/lcxfs1991/blog/issues/14 @ToPeas