Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 

If you ever find yourself writing code like this...

var mentor1 = "Daniel";
var mentor2 = "Irina";
var mentor3 = "Rares";

...then it's probably time to use an array!

Arrays are data structures that hold a list of values.

var mentors = ["Daniel", "Irina", "Rares"];

Arrays can hold any type of value (although almost always you only have one data type per array).

var testScores = [16, 49, 85];
var grades = ["F", "D", "A"];
var greetings = ["Hello, how are you?", "Hi! Nice to meet you!"];