Write 2 functions, one that takes the a number in base 10 (decimal) and converts it to the string representation of that number in base 2 (binary), and one that converts back.
You may not use parseInt
, toString
, or any similar function which does base conversion for you.