Thursday, 21 January 2016

JavaScript Arrays Example

<!DOCTYPE html>
<html>
<body>
<script>
var i;
var cars = new Array();
cars[0] = "Saab";
cars[1] = "Volvo";
cars[2] = "BMW";
for (i=0;i<cars.length;i++)
{document.write(cars[i] + "<br>"); }
</script>
</body>

</html>

0 comments:

Post a Comment