Javascript Cheat Sheet 2
Javascript Cheat Sheet 2
console.log() Output data to the console Arithmetic Operators Everyday math operations
// Numbers
let year = 2024; For Loop Runs based on an iterator variable
// Strings
let user = "@MrBeast"; for (let i = 1; i <= 3; i++) {
// Boolean console.log("Beetlejuice!");
let hungry = true; }
// Null // Will print "Beetlejuice!" 3 times
let newHire = null;
// Undefined Continue Keyword skips an iteration in a loop
let startingDate = undefined;
for (let i = 0; i < 5; i++) {
if (i == 1) {
Logical Operators Evaluate two conditions continue;
}
a && b # true if both conditions are true
console.log(i);
a || b # true if one condition is true
} // Will print numbers 0-4 except 1
!a # true if the condition is false
Made with by