Converts a decimal number to binary representation (base 2).
const bin1 = Chalkboard.numb.toBinary(10); // Returns "1010"const bin2 = Chalkboard.numb.toBinary(10, true); // Returns "0b1010" Copy
const bin1 = Chalkboard.numb.toBinary(10); // Returns "1010"const bin2 = Chalkboard.numb.toBinary(10, true); // Returns "0b1010"
The decimal number
Optional
Whether to include "0b" prefix (optional, defaults to false)
Converts a decimal number to binary representation (base 2).
Example