Programming 1 none Will the code from above print anything, if so, what printed ? If not, say NONE.
<!doctype html>
<html lang="en">
<head>
<title>
<meta charset="utf-8"/>
</head>
<body>
<script type="text/javascript">
function findAnswer() {
var a = new Date(2020, 12, 29);
// HINT: Be careful with getMonth()
var d = a.getFullYear() + a.getMonth();
var sum = d % 5;
document.getElementById("ans").innerHTML = sum.toString();
}
</script>
<form action="#" method="post" name="form1" id="form1" class="form" >
<input type="button" name="Submit" id="submit" value="Submit" onclick="findAnswer();"/>
</form>
<p id ="ans"></p>
</body>
</html>
none
Will the code from above print anything, if so, what printed ? If not, say NONE.
Trending now
This is a popular solution!
Step by step
Solved in 2 steps