Andy Boyle
Ground Rules
Ask questions
Java vs. JavaScript
HTML is a house
CSS is a painter or decorator
JavaScript is a contractor
Variables:
Finally using high school algebra
FYI on quotes
This slideshow can suck, so if you see ‘’ or “” make sure they’re actually non-smart quotes
Strings:
var firstName = “Andy”
var lastName = “Boyle”
Strings:
var fullName = firstName + lastName
Strings:
var fullName = firstName + “ “ + lastName
Strings:
var myName = fullName
Strings:
var myIntroduction = “My name is “ + fullName
Numbers:
1 + 6
6 - 1
7 * 7
8 / 4
Numbers:
var myAge = 29
dadAge = 58
myAge + dadAge
Alert
alert(“I’m sorry Dave, I can’t do that.”)
Alert
alert(myAge + 7)
jQuery
http://bit.ly/JSNICAR2015
jQuery
document.ready
jQuery
.click
.css
so many more!
If else
if (myAge < 29) {
alert(‘You’re younger than 29, ‘ + fullName);
} else {
alert(‘You’re older than or equal to 29, ‘ + fullName);
}
For loops
Check out the example to see some for loopin action!
Build stuff!
Make an alert say your name when you click on something
Have a console.log appear with math
Change a variable when you mouseover
Make a paragraph turn green
Change text in a paragraph?
Andy Boyle