This is the code:
var input = prompt("Enter a decimal value"); console.log(input +" the binary value would be:", Number.parseInt(input, 2