Why 1000000 and 1_000_000 both are same?

const a = 1000000;
const b = 1_000_000;

now if i checked

console.log(1000000 === 1_000_000);

and it’s return true

Why 1000000 and 1_000_000 both are same in javascript?

2 thoughts on “Why 1000000 and 1_000_000 both are same?”

Leave a Comment