I am doing:
let n = 00000000000000000000000000001011;
console.log(n); // 521
Why is it giving me 521?
Actually I was doing a program to count the total number of 1 in the number, so I started with the approach of converting my number to a string and then split it with n.split("") and using map to return new every element with Number(n) and later counting the number of 1 in array but its not working?