Understand
- How to apply arithmetic to JS variables and how to generate pseudorandom numbers
- Have an elementary understanding of properties and methods, and know one use case for each
Apply
- Complete CodeCademy exercises 2.5-2.10
- Use arithmetic, concatenation, .length, and .toUpperCase in classroom quiz show
Create
- Have students generate a quiz for their classmate
For the instructor's eyes only
10 min
30
Points
Difficulty
Console.log the following 3 calculations:
1. How many days are there in 6 years?
2. If there was $1000 divided among a class of 16 students, how much money would each student get?
3. How many years from now is 4013 AD?
console.log(365*6); //2190 or 2191 with leap year
console.log(1000/16); //$62.50 each
console.log(4013-2019); //1994
50
Points
Difficulty
1. Create two variables called age and name and set them to your age and name.
2. Console.log a phrase that tells the user your name, age, and how old you'll be in 57 years (using math operators).
console.log("My name is " + name + " and I am " + age + " years old. In 57 years, I'll be " + (age+57) + " years old.");
const age = 12;
const name = 'Joe';
10 min
80
Points
Difficulty
1. Create a variable called fullName and set it to your full name. Use the .length property to console.log the number of letters in your full name. Check your work!
2. Convert your full name to uppercase and console.log it.
console.log(fullName.toUpperCase());
const fullName = 'Joe Pesci';
console.log(fullName.length - 1);
10 Min
You must know the solutions for your own quiz!
👏🏿