摘要:
例如,我们要访问 info 对象的 animal 的 reptile 的 tortoise。但是我们不确定 animal,reptile是否存在,因此我们需要这样写: const tortoise = info.animal && info.animal.reptile && info.animal 阅读全文
摘要:
let x = (foo !== null && foo !== undefined) ? foo : bar(); 版本二: let x = foo ?? bar(); 阅读全文
摘要:
//Number类型在超过9009199254740991后,计算结果即出现问题 const num1 = 90091992547409910; console.log(num1 + 1); //90091992547409900 //BigInt 计算结果争取 const num2 = 90091 阅读全文
摘要:
阅读全文
![](https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1606294746710&di=e6190a53569b48744bd99a072e4a4b28&imgtype=0&src=http%3A%2F%2Finews.gtimg.com%2Fnewsapp_bt%2F0%2F10909102657%2F1000.jpg)