'F' → Fullscreen
console.log()
// Additionconsole.log("I'm adding 2 and 1. The result is:");console.log(2 + 1);console.log();
console.log("Adding $1000 and $500.96 gives us:");console.log(1000 + 500.96);console.log();
// Subtractionconsole.log("I have 3 apples, and I eat one. Now, I have:");console.log(3 - 1);console.log();//
// Additionconsole.log("I'm adding 2 and 1. The result is:");console.log(2 + 1);console.log();
console.log("Adding $1000 and $500.96 gives us:");console.log(1000 + 500.96);console.log();
// Subtractionconsole.log("I have 3 apples, and I eat one. Now, I have:");console.log(3 - 1);console.log();
// Multiplicationconsole.log("I'm 30 years old. In months, that's: "); // Replace 30 with your ageconsole.log(30 * 12); // Replace 30 with your ageconsole.log();
// Division - Quotient and remainderconsole.log("If we divide 8 pizza slices between 2 people, each person gets:");console.log(8 / 2);console.log();
console.log("Dividing $100 among 6 people gives each person:");console.log(100 / 6);console.log();//
// Additionconsole.log("I'm adding 2 and 1. The result is:");console.log(2 + 1);console.log();
console.log("Adding $1000 and $500.96 gives us:");console.log(1000 + 500.96);console.log();
// Subtractionconsole.log("I have 3 apples, and I eat one. Now, I have:");console.log(3 - 1);console.log();
// Multiplicationconsole.log("I'm 30 years old. In months, that's: "); // Replace 30 with your ageconsole.log(30 * 12); // Replace 30 with your ageconsole.log();
// Division - Quotient and remainderconsole.log("If we divide 8 pizza slices between 2 people, each person gets:");console.log(8 / 2);console.log();
console.log("Dividing $100 among 6 people gives each person:");console.log(100 / 6);console.log();
// Remainder using the modulus, or mod, operatorconsole.log("After dividing $100 among 6 people, the leftover cents are:");console.log(100 % 6);console.log();//
// Additionconsole.log("I'm adding 2 and 1. The result is:");console.log(2 + 1);console.log();
console.log("Adding $1000 and $500.96 gives us:");console.log(1000 + 500.96);console.log();
// Subtractionconsole.log("I have 3 apples, and I eat one. Now, I have:");console.log(3 - 1);console.log();
// Multiplicationconsole.log("I'm 30 years old. In months, that's: "); // Replace 30 with your ageconsole.log(30 * 12); // Replace 30 with your ageconsole.log();
// Division - Quotient and remainderconsole.log("If we divide 8 pizza slices between 2 people, each person gets:");console.log(8 / 2);console.log();
console.log("Dividing $100 among 6 people gives each person:");console.log(100 / 6);console.log();
// Remainder using the modulus, or mod, operatorconsole.log("After dividing $100 among 6 people, the leftover cents are:");console.log(100 % 6);console.log();
// Order of operationsconsole.log("The expression 4 * 10 + 12 equals:");console.log(4 * 10 + 12);console.log("The expression 4 * (10 + 12); equals:");console.log(4 * (10 + 12));//
Your program output should something similar to the sample output below.
I'm adding 2 and 1. The result is:3
Adding $1000 and $500.96 gives us:1500.96
I have 3 apples, and I eat one. Now, I have:2
I'm 30 years old. In months, that's:360
If we divide 8 pizza slices between 2 people, each person gets:4
Dividing $100 among 6 people gives each person:16.666666666666668
After dividing $100 among 6 people, the leftover cents are:4
The expression 4 * 10 + 12 equals:52The expression 4 * (10 + 12); equals:88
You may write your reflection answers as comments at the bottom of your code.
Submit your activity and reflection answers to the appropriate dropbox.