Challenge 3: Convert Decimal Number to Binary Number

Given a decimal number, convert it to a binary number.

Problem Statement

Write a function that takes a number testVariable and returns a string that is its equivalent binary number.


A variable testVariable containing the decimal number.


A string variable that contains the equivalent binary number of the input number.

Sample Input


Sample Output


Try it Yourself

Try this challenge yourself before moving on to the solution. Good luck!

Level up your interview prep. Join Educative to access 70+ hands-on prep courses.