JavaScript/this:修订间差异
来自康健生活
| 第115行: | 第115行: | ||
箭头函数没有构造函数 constructor | 箭头函数没有构造函数 constructor | ||
== 自执行函数 == | == 自执行函数 == | ||
<syntaxhighlight lang="javascript"> | |||
lang="javascript"> | (function(){ | ||
// todo | |||
</ | })() | ||
(function(){ | |||
// todo | |||
}()) | |||
(()=>{ | |||
// todo | |||
})()</syntaxhighlight> | |||
== 数组中的 this == | == 数组中的 this == | ||
{{leftrightflex|<syntaxhighlight | {{leftrightflex|<syntaxhighlight | ||