loading...

re: What’s your alternative solution? Challenge #49 VIEW POST

FULL DISCUSSION
 

not the most readable answer but!

binaryToNumber = s => {let r=0; s.split('').reverse().forEach((c,i) => r += c*2**i); return r}
code of conduct - report abuse