Getting user data in the form of array and printing it using javascript!!

Getting user data in the form of array and printing it using javascript!!




<!DOCTYPE html>
<html>
<head>
<title>JAVASCRIPT</title> <script type="text/javascript"> var inp = new Array(5); for(var i=0;i<5;i++)
{
inp[i]= prompt("PLEASE ENTER ANY 5 VALUES");
} document.write("<b><u>VALUES ENTERED BY YOU ARE AS FOLLOWS</b></u><br>");
for(var j=0;j<5;j++)
{
document.write("<br> " + inp[j]);
}
</script>
</head>
<body > </body>
</html>

Code




output

Comments

Popular posts from this blog