微信扫一扫
const str = undefinedconst restr = str?.name ?? "Unknown";console.log(restr); // "Unknown"
相关推荐