这段程序会输出什么?

来自 类型推断
TypeScript 6 入门 3分钟

这段程序会输出什么?

TypeScript
const weights = [4, 7, 10];
const labels = weights
  .filter((weight) => weight >= 7)
  .map((weight, index) => `${index}:${weight * 2}`);

console.log(labels.join(" | "));
在试验场中打开
报告错误