JavaScript/new.target:修订间差异
来自康健生活
| 第95行: | 第95行: | ||
} | } | ||
const foo = User.bind({age: '18'}); | const foo = User.bind({age: '18'}); | ||
const bar = | const bar = foo('Bob'); | ||
console.log(foo); | console.log(foo); | ||
console.log(bar);</syntaxhighlight>|{{consoleout|<pre> | console.log(bar);</syntaxhighlight>|{{consoleout|<pre> | ||