-
Write a function called logIn that takes your name as a parameter and console.logs 'Hello /your name/!' when it is called
-
Take that function up a notch by creating a new variable called isLoggedIn, that logs 'Hello /your name/!' when the variable is true, or "please log in" when it is false
-
We are looking to re-sod our lawn. It has a length of 20' and a width of 30', with Sod costing $1.45/sqft. Additionally, it will cost $100 to have thew work done. Write a function that finds the area of the lawn, the price of the Sod, and what the total cost will be to get the lawn redone
-
Write a function that loops over the following array of SEI students and prints out their name, and how many letters their name is
const students = [
'Alice',
'Andrew',
'Casey',
'Damian',
'Grant',
'Howie',
'Wade',
'Kat',
'Kimbrad',
'Kiu',
'Natasha',
'Obi',
'Pedro',
'Sarah',
'Scott',
'Tiffany',
'Zhe'
]
It should give us "Alice is 5 letters long"... and so on
-
FizzBuzz
-
Write a javascript application that logs all numbers from 1 - 100.
-
If a number is divisible by 3 log "Fizz" instead of the number.
-
If a number is divisible by 5 log "Buzz" instead of the number.
-
If a number is divisible by 3 and 5 log "FizzBuzz" instead of the number.
-
Checkerboard
Set a checkerboard size to a variable
const boardSize = 8;
Now, using what you know about control flow, build a checkerboard
# # # #
# # # #
# # # #
# # # #
# # # #
# # # #
# # # #
# # # #
You should be able to change the variable boardSize
and generate a larger or smaller grid
const boardSize = 20;
Should now generate:
# # # # # # # # # #
# # # # # # # # # #
# # # # # # # # # #
# # # # # # # # # #
# # # # # # # # # #
# # # # # # # # # #
# # # # # # # # # #
# # # # # # # # # #
# # # # # # # # # #
# # # # # # # # # #
# # # # # # # # # #
# # # # # # # # # #
# # # # # # # # # #
# # # # # # # # # #
# # # # # # # # # #
# # # # # # # # # #
# # # # # # # # # #
# # # # # # # # # #
# # # # # # # # # #
# # # # # # # # # #