let Big = 11243566n;
console.log (' ${Big} ${typeof Big}.');
控制台显示:
${Big} ${typeof Big}.
如何打印
11243566 [BigInt]
或类似的东西?
您必须使用`
而不是单引号:
let Big = 11243566n;
console.log (` ${Big} ${typeof Big}.`);