这段程序会输出什么?

来自 call、apply 与 bind
Node 24 进阶 2分钟

这段程序会输出什么?

JavaScript
'use strict';

function show(label) {
  return `${label}:${this.id}`;
}

const base = { id: 'base' };
const first = show.bind({ id: 'one' }, 'bound');
const second = first.bind({ id: 'two' }, 'later');

console.log(show.call(base, 'call'));
console.log(show.apply(base, ['apply']));
console.log(second());
在试验场中打开
报告错误