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 ...
-
When you begin to build your website, it's a very clever idea to organize your files and folders efficiently. You should have: A ...
-
It is a very good idea when creating a new webpage to reset all styles for the browser. This ensures that all browsers are starting off on ...
-
Did you know that strftime() is an SQLite function than allows the programmer to return a formatted date. It takes two arguments: ...
No comments:
Post a Comment