Fall 2024 - P5
Big Idea 3 | .1 | .2 | .3 | .4 | .5 | .6 | .7 | .8 | .10 |
3.1 JavaScript Variables Popcorn Hacks
In classrom JavaScript challenges, aka popcorn hacks
// Declare a set of your own three variables
// Example:
let a = 20;
let favorite_subject = "CSP";
let favorite_sport = "Basketball";
// Declare an object variable, and log the object to the console
// Example:
const person = {
firstName: "Cool",
lastName: "Person",
age: 40,
job: teacher,
hobbies: ["reading", "traveling", "coding"]
};
console.log(person);
// Create two integer type variables, and create two string type variables, and add the two sets of variables together, and log to the console
let num1 = 30;
let num2 = 10;
let string1 = "This is ";
let string2 = "very cool.";
console.log(num1 + num2);
console.log(string1 + string2);