JS存档

JavaScript是如何工作的:引擎,运行时和调用堆栈的概述!

image image image

yihong0618

### [关于箭头函数](https://www.codenong.com/39629962/) ```javascript const myFunc = (stuff) => { someArray.push(stuff) } const otherFunc = (stuff) => someArray.push(stuff) console.log(myFunc()) // --> logs undefined console.logo(otherFunc()) // --> logs result of push which is new array length const x = () => {} // Does nothing const y = () => ({}) // returns an object ```

yihong0618

1. js的字符串也是不可变类型,需要先转换成数组 2. 关于转换和python基本一样

yihong0618

[关于JS中的无穷数](https://juejin.im/post/5e0005086fb9a016464356e8)

yihong0618

map 必须用set 而不能像python那样直接a[2] =3 赋值