柠条

Results 6 comments of 柠条

```javascript function myNew() { // 创建一个空对象 let obj = {}; //获取构造函数 let Con = [].shift.call(arguments); // 设置对象的原型 obj.__proto__ = Con.prototype; // 绑定this let result = Con.apply(obj, arguments); // 判断返回值是不是一个对象,如果是,那么返回这个对象,否则返回新创建的对象 return...

```js function print(n) { setTimeout(() => { console.log(n) }, 0*Math.floor(Math.random() * 1000)) } for (var i = 0; i < 100; i++) { print(i) } ```

用vs code 打开 执行命令 具体看这里 http://blog.sina.com.cn/s/blog_e746c2e90102wnuj.html

还有这边文章 http://blog.sina.com.cn/s/blog_e746c2e90102wnul.html

访问不了是因为 easy-mock 出问题了 -