This JavaScript example runs a for-of loops over the elements of an array.
<!DOCTYPE html> <html> <head> <title>XoaX.net's Javascript</title> </head> <body> <script type="text/javascript" src="ForOfLoops.js"></script> </body> </html>
var saJoyfulMysteries = ["The Annunciation", "The Visitation", "The Nativity",
"The Presentation in the Temple", "The Finding in the Temple"];
// For-of loop on an array
for(var sMystery of saJoyfulMysteries){
document.writeln(sMystery + "<br />");
}
© 20072024 XoaX.net LLC. All rights reserved.