I'm just a beginner,so regarding my solution to question 1,i've no idea whether it's correct or wrong,but hope any expert can correct and teach me(i just learn javascript last 2 weeks)

<!-- Define a function max() that takes two numbers as arguments and returns the largest of them. Use the if-then-else construct available in Javascript.


<script type="text/javascript">

function max(firstNumber , secondNumber)
if (firstNumber > secondNumber)
else if (isNaN(firstNumber) || isNaN(secondNumber))
document.write("You are not entering a number");
var firstNumber = parseFloat(prompt("Please enter your first number","")); <!-- the function parseFloat is use to prevent error when comparing negative number -->
var secondNumber = parseFloat(prompt("Please enter your second number",""));
max(firstNumber, secondNumber);