Can't my script to work need help


#1

My Index:

<!DOCTYPE html>
<html>
    <head>
    <button onclick = Sign_up()>Sign up</button>
        <title></title>
        <link/>
        <script>
        function Sign_up()
        {
        var Age = prompt("What is your Age")
        }
    </script>
    <script src ='script.js'></script>
	</head>
	<body>
        <!--Add your own HTML!-->   
	</body>
</html>

My script.js:

if (Age < 5)
return ("We are not responsiable for any incounters");
if (Age === 5)
return ("We are not responsiable for any incounters");
if (Age > 5)
return ("Enjoy!");

#2

return can only be used inside a function, here:

if (Age < 5)
return ("We are not responsiable for any incounters");
if (Age === 5)
return ("We are not responsiable for any incounters");
if (Age > 5)
return ("Enjoy!");

you use return but the if clauses are not in a functions (why not use if, else if and else? )

why do you have <script></script> twice? You only need one script right,


#3

Thankyou for your feedback I have sorted it all out from you and some others Thanks again