GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Arrays Iterators README.md update. · gurucharanD/JavaScript-Lessons@9f04136

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • Data_Structures/Arrays/Iterators
    • README.md
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎Data_Structures/Arrays/Iterators/README.md‎

Copy file name to clipboardExpand all lines: Data_Structures/Arrays/Iterators/README.md
+14-7Lines changed: 14 additions & 7 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,24 @@
11
![](http://i.imgur.com/BgUMUGU.png)
22

33
# Iterators
4-
This MD file serves as example/template. It will be filled up soon.
5-
6-
(for Bucky to fill up)
4+
**Simple Iteration**
5+
The way to iterate elements in javascript arrays is pretty straight forward:
76

8-
# Course Documentation
7+
console.log(food[2]);
98

10-
(this for me to fill up with every element that you use in lessons. syntax explaination and links for more)
9+
Array values are retrieved by index (starting at 0 not 1).
10+
11+
**Iteration through loop**
12+
The best way to iterate an array is mathematically through a loop, like the example bellow:
1113

12-
## Element to explain
14+
// you can iterate over an array to access each individual element
15+
for(var i=0; i<food.length; i++){
16+
console.log(i, food[i]);
17+
}
18+
19+
1320

14-
(for example console.log)
21+
# Course Documentation
1522

1623
##Javascript functions
1724

0 commit comments

Comments
0 (0)
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.