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