Wednesday, 4 July 2012

Ex15: For..Each loop in VBScript


<!DOCTYPE html>
<html>
<body>


<script type="text/vbscript">
Dim cars(2)
cars(0)="Volvo"
cars(1)="Saab"
cars(2)="BMW"


For Each x In cars
  document.write(x & "<br />")
Next
</script>


</body>
</html>

No comments:

Post a Comment