Reversed Binary Numbers in JavaScript
prompt("Please enter a decimal number");


is a little confusing to me. I thought you wanted a number with a few decimal digits on it.

It might make more sense to say "Please enter a base 10 number"



You are a little incosistent in how you turn your string numbers into number numbers.

In the beginning, you use parseInt:

var binConvert = parseInt(decimal, 10).toString(2);


In the end, you use parseInt:

alert(parseInt(makeNumber, 2));


But in the middle, you use Number:

var makeNumber = Number(srj);


It is better to be consistent and stick to one function (in my opinion, you should use parseInt).



If you take the above advice in using parseInt, you can then get rid of the last parseInt call like so:

var makeNumber = parseInt(srj, 2); // I moved the parseInt call up here

//convert back to decimal
alert(makeNumber);




This might just be me, but your comments are a little confusing.

Here, you wrote:

//convert back to decimal
alert(parseInt(makeNumber, 2));


Aren't you technically converting to binary? (The radix parameter of parseInt is 2).