Hi, I'm trying to find out why my code won't run. I passed my years variable to the function to multiplied by 365 and stored in my time variable which should be printed out. Should "toDays(21)" be declared in my function instead?
<!DOCTYPE html>
<html>
<head>
<script>
var years;
toDays(21);
function toDays(years)
{
var time;
time = 365*years;
return time;
}
document.write("My age is " + time.value-0);
</script>
</head>
<body>
</body>
</html>