Arrays | MDN

We can arrange items inside of an array.

Declare an array using -> var arrayname =[item, item, item];

Call an item -> arrayname[index] will return the item at location index.

Methods

Practice Problems!

Fizz Buzz

Fizz Buzz is a program that starts counting from 1. For multiple of 3, fizz is said. For multiples of 5, buzz. If this number is a multiple of 3 and 5, fizzbuzz is said.

My logic below

Keep an index.

If number % 3 = 0, fizz. If number % 5 = 0 , buzz. If number %3 ==0 && number %5 ==0, fizz buzz. Index++

display here

Practice Problem! Who's Paying

Create a program to see who's buying lunch for the Limbus Company Sinners today.

display here