binary string to int js code example
Example 1: binary to int javascript
let binary = 0001
parseInt(binary, 2)
// returns 1
Example 2: nodejs binary string to decimal number
var digit = parseInt(binary, 2);
let binary = 0001
parseInt(binary, 2)
// returns 1
var digit = parseInt(binary, 2);