+ 4
Where is the mistake in this code?
<!DOCTYPE html> <html> <head> <title>Page Title</title> </head> <body> <script type="text/javascript""> function add numbers() { var sum= firstnumber + secondnumber ; return sum; } var = addnumber (10,20); document.write(result); </script> </body> </html>
3 Answers
+ 14
<!DOCTYPE html>
<html>
<head>
<title>Page Title</title>
</head>
<body>
<script>
function addNumbers(first, second) {
let sum = first + second;
return sum;
}
let test = addNumbers(10,20);
document.write(result);
</script>
</body>
</html>
this should work
post a link to the code next time
+ 3
thanks
0
<!DOCTYPE html>
<html>
<head>
<title>Page Title</title>
</head>
<body>
<script type="text/javascript"">
function addnumber(firstnumber,secondnumber)
{
var sum= firstnumber + secondnumber ;
return sum;
}
var result = addnumber(10,20);
document.write(result);
</script>
</body>
</html>
this one help me thanks