JavaScript Program to Convert Decimal Number to Binary Equivalent

Write a JavaScript program to convert Decimal number to Binary equivalent.

Source Code
    <title>Convert Decimal number to Binary number</title>
    var decimal = parseInt(prompt("Enter the decimal number", ""));
    var binary = decimal.toString(2);
    document.write("Binary equivalent of " + decimal + " is : " + binary)

"Coding Hub - Learn to code" app now available on Google Play Store