Originally published as GitHub issue #18.
JavaScript是如何工作的:引擎,运行时和调用堆栈的概述!

Comments
yihong0618
View comment · 2019-12-05T01:03:26Z
关于箭头函数
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
View comment · 2019-12-27T01:11:56Z
- js的字符串也是不可变类型,需要先转换成数组
- 关于转换和python基本一样
yihong0618
View comment · 2020-01-02T01:15:12Z
yihong0618
View comment · 2020-01-13T01:27:57Z
map 必须用set 而不能像python那样直接a[2] =3 赋值