convert binary to number in js code example Example: convert binary to decimal javascript var digit = parseInt(binary, 2);