Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

262
Views
why my number binary number showing 521 in javascript?

I am doing:

let n = 00000000000000000000000000001011;

console.log(n); // 521 

  1. Why is it giving me 521?

  2. 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?

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!