I do not know what is wrong with my code but even if the first number is the largest, it does not display it but displays the second largest number
I did as one of suggested but my problem is that for example if I put the numbers as (100,58,12,0) the first number 100 will not display but 58 will which I find confusing
thanks for everyone who helped mr, I found the solution to my problem
var FirstNumber;
FirstNumber = window.prompt("Enter the First number");
var SecondNumber;
SecondNumber = window.prompt("Enter the Second number");
var ThirdNumber;
ThirdNumber = window.prompt("Enter the third number");
var ForthNumber;
ForthNumber = window.prompt("Enter the forth number");
var max = Math.max(FirstNumber, SecondNumber, ThirdNumber, ForthNumber);
document.writeln("<p>" + max + " is the largest number </p>");
Math.max()?max = Math.max(FirstNumber, SecondNumber, ThirdNumber, FourtNumber)