Below is an example of a for loop from JavaScript. Have a look and see if you understand how it works:
var fruits = ["peach", "orange", "Apple"];
for (var i = 0; i<fruits.length; i++)
{
//we are now inside our loop.
document.write("value of i is: " + i);
//this is the html for a new line.
document.write("<br>");
document.write("the fruit at i is: " + fruits[i]);
document.write("<br>");
}
Subscribe to:
Post Comments (Atom)
Web Development: Organizing Files and Folders
When you begin to build your website, it's a very clever idea to organize your files and folders efficiently. You should have: A ...
-
Continuing our journey through Automate the Boring Stuff with Python's excel lessons, we came across the get_column_letter and column_in...
-
Some words are reserved in JavaScript and cannot be used as variable names. Some common examples are: case catch for let private th...
-
When inserting images from the CC library in Adobe DreamWeaver, it's usually better to 'Download Linked' or Download Unlinked...
No comments:
Post a Comment