Alerting & Logging alert("Hi there :)"); console.log('Hi there as well :-S'); Variables // Constant const specialNumber = 7; // Dynamic variable let otherNumber = 9; // Old school var oldNumber = 10; console.log(specialNumber + otherNumber); //Basic Math Operation: //with + - * / and your variables //Concatenation of different data types & content always with a plus + "The final number is:" + result; //Backtick quotes `` are used to combine variables and textual data, ex.: `Result is: ${result}` //Conditionals if(x == 7) { // do something } else if(x == 5) { // do something else } else { // do nothing } // Comparison operators /* == is equal to != is NOT equal < is smaller than > is greater than <= is smaller than or equal to >= is greater than or equal to additional/optional "equal type" checking === is equal to and of same data type !== is NOT equal to or of same data type multiple conditionals using && (And): */ if(x == 7 && x <= pizzaNumber) { alert("Hooray, you ate all the pizzas"); } /* using || (Or via the pipe symbol) */ if(x == 7 || x == 5) { alert("you won the lottery") } // Arrays let myCars = ["Audi", "Volvo", "Chrysler"] console.log(myCars[0]) // will output "Audi" console.log(myCars[2]) // will output "Chrysler" // in sqaure brackets sits the index number // that targets each individual element. // it starts counting from 0 //Looping through an Array for(let i = 0; i < myCars.length; i++) { console.log(myCars[i]); } //i++ means i = i + 1; //another version i += 1; //change values in the array as follows: myCars[2] = "BMW"; //this will replace "Chrysler" in the array