To check if the input is a number in JavaScript

function Calculate(){
    var entry;
    var number = new Number();
    entry = prompt("Enter a number or string: ", "Enter number or string here");
    number = Number(entry);
    if (isNaN(number)){
        document.writeln("<P>You entered: " + entry+ "</p>");
        document.write("<P>It was not a number</p>");}
    else{
        document.writeln("<P>You entered: " + entry + "</p>");
        document.write("<P>It was a number.</p>");
    }
}