nodejs loop over array

Learn to use arrays in nodejs

First let’s create a very simple array:

Now we’ve got an array with the three fruits, yummy!

Next, we’ll simply loop over them and print them out to the console.

You can work right from github using:

https://github.com/onkea/nodejs-array-looping/blob/master/loop.js

 

Let’s step it up a bit and work with a multi-dimensional  array in nodejs:

Run this and you should get:

You can work with the code right now in jsfiddle:

Questions