Javascript Tutorial For Beginners – #4 Javascript Arrays & Loops

This Javascript tutorial covers Javascript arrays and looping arrays in Javascript. Arrays store lists of items of any type. You can iterate a Javascript array with loops, making it easy to run actions on all of the items in the array.

This is a Free Javascript Course designed for beginners. These Javascript lessons cover the basics of Javascript and programming basics from the very beginning.


Musab Bukhari says:

Man you are so good… *RESPECT*…

Linkin Pаrk says:

outputing text will be hard to get used to because i am used to the c++ syntax for out putting text on the screen, which has no + sign between the 2 strings… it is seperated by a cheveron as i like to call the operator “<<"


while (1<2)

Sergio Alvarado says:

i’m new to js but have experience with scripting. Great reveiw

LemonPug says:

html and css where super easy, javascript is super HARD!

Vlzxc ;-;7 says:

Thanks I’ve been doing one of these lessons a day and I’m progressing incredibly! Your teaching videos are really helping me learn the basics of javascript. I even have some of my own scripts already!

Simón Aparicio says:

where i can get the software for programming, what do yu recomend??

Sonu Prabhakar says:

nice tutorial…thanks…can u suggest me good books for javascript for beginners?

dog e says:

Your tutorials are dog shit. Suck a dick.

Devonta Fortune says:

im not good at looping please help 🙁

rahul says:

awesome explanation thank you so muchhh!!!

I7itI3ull T.O says:

the developer console shows only the last value of the ones i put in the array
any explanation?

MJ_305 says:

Best instructor ever!

James Muriuki says:

this literally saved me thank you

shame nick says:

so sincerely appreciate for u sharing so great video. thx 🙂

Joshua Patel says:

There’s while loops, do loops, for loops, and infinite loops. He never said infinite loops.

Hima Kanakala says:

How do you connect the main.js file to the console? I had trouble with that.

Lucas Scott says:

how do you loop just the apples multiple times?

Imufur says:

does the foreach need that fucntion(value, index) or can it be something else like a function we make?

Sami Younas says:

I added the script tag into the HTML file but still got the same error
“VM73:1 Uncaught ReferenceError: myList is not defined”
I am using atom on windows 7.
any help would be appreciated

TV Istina Nis says:

Is this good usage of while loop? (it’s for last FOR loop example)

var myList = [‘bananas’, ‘oranges’, ‘apples’];
var i=0;
while (i

Chineye says:

Probably a stupid question but this my first video here. How are you inputting the code into the browser? Is it an IDE or are you typing it into the console? How is it connecting to the code and the browser

globalwarming08 says:

Which application are you using to develop/run the code?

Shashank Raman says:

Great videos you got there!

CritZ says:

7:25 is the good spot XD

Also, awesome video! You helped me a lot in coding my own bot (even though i’m unsure if it will work as I plan it, but so much for that). You earned yourself a sub. =)

ilker surmeli says:

Very clear teaching. Good teacher.

Joyeeta Bhattacharya says:

wow u just made looping so much easier. .

Josh Rochon says:

The “for” loop was literally the simplest thing I’ve seen in my life. The other two were confusing AF

lala Sara says:

or you can do,
var times =0;
while (times < 10){ alert( times++); }

Stephen Wilson says:

Great videos

Please see the ‘homework’ below: –

//Functions are a piece of code that does one or more actions
//Do not repeat yourself DRY

function add(first, second){
return first+second;

function subtract(first, second){
return first-second;

function multiply(first,second){
return first*second;

function divide(first, second){
return first/second;

alert(add (9, 3));
alert(subtract (9, 3));
alert(multiply (9, 3));
alert(divide (9, 3));

SogMosee says:

Hello, what theme of sublime are you using in this video? It looks very clean and beautiful.

Andriken sonwane says:

bro ‘ i really like the way you teach , how many years of experience you have in javascript ? i want to be advanced like you , i just started to learn it weeks ago i created rock paper scissor game on my own … ! tell me .

Zenro GG says:

I found this weird bug. If i define variable as “name” it would not identify it as an array

var name = [‘john,’ ‘gerry’, ‘laura’]

but anything else other than “name” works. I’m doing my head wondering what’s going on, and i only have this single line of code…

Emil Schjerven Brenden says:

What program are you using to write the code in?

javiface91 says:

Please help! I don’t understand library mode :S how can I connect my JS console to Sublime? Thanks!

Romy Kim says:

I understand left side is sublime and right side is chrome, but how do you connect them ? I guess that localhost:9000 does the magic. Thanks for the great instructions.

Ben Harris says:

Thanks you so much for these videos. I love learning these things without paying a dime.

Dylan KY says:

What do i need to do to multiply with a loop. I’d like my result to be the table of 7: 0,7,14,21, etc in a table

Thank You

raul riquelme says:

good tutorial, I recommend that course to learn well javascript beginner – medium?

schmarty pantz says:

jason bateman teaching code

King Kellz says:

i’m following along and i linked my js to my html but i don’t see you show your css anywhere, i’m OCD that way and i need it lol

Muhtasim Ahmed says:

What is that window. please tell me how to use it

 Write a comment


Do you like our videos?
Do you want to see more like that?

Please click below to support us on Facebook!