Sesion 10
JavaScript
Intermediate


Fizz Buzz

Using for, if, and arrays.

Fizz Buzz:



Fibonacci Sequence

Fibonacci: 0, 1, 1



Love calculator

Using, if statement and logical comparators.

Your name && Your Crush's name%X




Get a random number between 1 and 6

Functions used: Math.random() && Math.floor()




Is a year leap?

Using if statements, logical comparators.
A year is a leap year if it is evenly divisible by 4 ;
except if that year is also evenly divisible by 100;
unless that year is also evenly divisible by 400.


e.g. Is the year 2000 a leap year?:
2000 ÷ 4 = 500 (Leap)
2000 ÷ 100 = 20 (Not Leap)
2000 ÷ 400 = 5 (Leap!)

¡#Year is a --- year!