1. Js undefined is at risk of being overwritten. Although the undefined property of window has been set to read-only in ES5, there is still the possibility of tampering in the local scope

void 0 === undefined // true
Copy the code

2. Bugs in JS

typeof null == 'object'
Copy the code

9007199254740992 === 9007199254740993; The following result is displayed on the browser:

let a = 99999999999999999999; a; / / 100000000000000000000Copy the code

You can do this by using BigInt. The simplest way is to add an n directly after it, for example, 9007199254740992n. It can also be done through:

Let a = BigInt('9007199254740992'), // But do not let a = BigInt(9007199254740995); // Pass a large integer directly, at which point the data has changedCopy the code