Let's run that back
Study Community Networking (Mar. 8th)
#zebra {
color: red;
}
Only one id with the same value per document
<section>
<p>Hello, Twitch!</p>
<p id="zebra">Hello, Youtube!</p>
</section>
.bob {
color: red;
}
Multiple with same value allowed per document
<section>
<p class="robot">Hello, Twitch!</p>
<p id="zebra" class="bob">Hello, Youtube!</p>
<p class="bob">Goodbye, Mixer!</p>
</section>
Syntax: "Spelling and grammar" rules of a programming language.
if (age > 18){
console.log("You are an adult")
}
9 === 9 //true
7 === 3 //false
"Hello" === "Hello" //true
if(condition is true) {
//Do cool stuff
}
if(condition is true) {
//Do this cool stuff
}else if(condition is true){
//Do this other cool stuff
}else{
//Default cool stuff
}
const pizza = "Dominos"
if (pizza === "Papa Johns") {
console.log("Scram!")
} else if(pizza === "Dominos") {
console.log("All aboard the train to flavor town")
} else {
console.log("What are you even doing with your life?")
}
if (name === "Leon" && status === "Ballin"){
//Wink at camera
}
if (day === "Saturday" || day === "Sunday"){
//It is the weekend
}
function name(parameters){
//body
}
//call
name(arguments)
function yell(word){
alert(word)
}
yell("HELLO")
COMMENT OUT YOUR JS
TYPE IT ALL OUT AGAIN WITHOUT LOOKING
PEAK IF YOU HAVE TOO
REPEAT UNTIL YOU DO NOT HAVE TO PEAK
DELETE YOUR JS ENTIRELY
AND DO IT AGAIN
THEN DO IT AGAIN BUT CHANGE SOMETHING!