bin-to-decimal
1.1.1 • Public • Published bin-to-decimal
converts binary numbers into decimal (base 10)
var binToDecimal = require('bin-to-decimal');
var dec = binToDecimal('100111100110101');
Don't get excited about this. This was an exercise. You should just do.
let bin = 1010101;
let dec = parseInt((bin).toString(), 2);
/bin-to-decimal/
//
Package Sidebar
Install
Weekly Downloads