Pages
HOME
HTML5
CSS3
JAVASCRIPT
PHP
C
SEO/SMM
SOFTWARE
TIPS & TRICKS
PRIVACY POLICY
CONTACTS
Friday, August 16, 2013
JavaScript for in statement
<html>
<body>
<script type="text/javascript">
var x;
var mycars = new Array();
mycars[0] = "Saab";
mycars[1] = "Volvo";
mycars[2] = "BMW";
for (x in mycars)
{
document.write(mycars[x] + "<br />");
}
</script>
</body>
</html>
Result
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment