这段程序会输出什么?
TypeScript
function label(value: string | number | null): string {
if (!value) return "missing";
return typeof value === "string"
? value.toUpperCase()
: value.toFixed(0);
}
console.log(label(0));
console.log(label(""));
console.log(label(2.6));