An array is a special variable, which can hold more than one value at a time.
Storing courses in single variables could look like this:
However, what if you want to loop through the courses and find a specific one? And what if you had not 3 courses, but 50?
The solution is an array!
An array can hold many values under a single name, and you can access the values by referring to an index number.
Creating an Array
Array Syntax is as follows:
var array_name = [item1, item2, item2,...];
Array Example is as follows:
How to insert a comment that has more than one line?
How does a FOR loop start?
How does a WHILE loop start?
How to write an IF statement for executing some code if "i" is NOT equal to 5?