Q 2 Assignment 6

User Age is:

User Age is:

User Age is:

User Age is:

User Age is:

<form>
	<input type="button" name="button" value="Click Me!" onclick="getage()">
</form>

<script type="text/javascript">
		
		function getage(){
			var y = prompt("Enter your age");
			
			var z = document.getElementsByClassName('age');

				for(value of z){
					document.writeln(value.innerHTML +" "+ y + " years old" + "<br>");
				}

		}

</script>