Version 2.7
Line breaks
Lower versus upper case
Variable types (strings versus integers versus booleans)
White space on the same line (tabs versus spaces)
(Think about the beginning of a for loop)
< _________ _____ = "myScript.js" >< / _________ >
// versus /*...*/
Which is let?
Which is const?
"Welcome to our site, " + userName
`Welcome to our site, ${userName}`
=
versus
===
if ( ____ === _____ ) {
___________
}
else {
___________
}
for ( var counter = 0 ; counter < 20 ; counter ++ ) {
___________
}
for ( var counter = 0 ; counter < cats.length ; counter ++ ) {
___________
}
cats.forEach(
cat => cat.___________
}
alert( "Hey bud!" ) ;
let horoscope = prompt( "What's your astrological sign?" ) ;
sayHi = function( message ) {
alert( message ) ;
}
or
sayHi = (message) => {
alert( message ) ;
}
cats = [ ] ;
cats.length
cats[0], cats[1], etc.
cats.push( "Grumpy" )
document.querySelector( "#Lucy" )
document.querySelectorAll( ".kitten" ).forEach( div => ... )
document.querySelectorAll( "div" ).forEach( div => ... )
myKittenDiv.innerHTML = "Grumpy" ;
The selector (# for an id, . for a class, or a tag name)
The braces {} around the style rule.
The hyphen in a style attribute like background-color.
A value like blue.
The colon : separating the property and value.
#catDiv {
background-color: blue ;
}
↓
document.________________( "__________" ).______.background__olor __ _______ ;