Sam

Results 17 comments of Sam

非匿名自执行函数,函数名只读

```js class MinStack { constructor () { this.length = 0; this.content = []; this.mins = []; } push (val) { const curMin = this.mins[this.length - 1] !== undefined ? this.mins[this.length...

@Mr-jili 只是将栈的功能实现了, 不然使用数组的 pop 和 push, 那就不需要实现栈了. length 只是用来划的

> 4种方式: > > ```js > //Promise > const sleep = time => { > return new Promise(resolve => setTimeout(resolve,time)) > } > sleep(1000).then(()=>{ > console.log(1) > }) > >...

> You can already use this library with these changes to your code (ts): > > * Use `import * as mqtt from 'mqtt/dist/mqtt.min';` > * Add `"skipLibCheck": true` to...