1 of 26

Andy Boyle

NBC News Breaking News,

Full-Stack Developer

@andymboyle

#NICAR16

andymboyle@gmail.com

2 of 26

Ground Rules

3 of 26

4 of 26

Ask questions

5 of 26

Java vs. JavaScript

6 of 26

HTML is a house

7 of 26

CSS is a painter or decorator

8 of 26

JavaScript is a contractor

9 of 26

Variables:

Finally using high school algebra

10 of 26

FYI on quotes

This slideshow can suck, so if you see ‘’ or “” make sure they’re actually non-smart quotes

11 of 26

Strings:

var firstName = “Andy”

var lastName = “Boyle”

12 of 26

Strings:

var fullName = firstName + lastName

13 of 26

Strings:

var fullName = firstName + “ “ + lastName

14 of 26

Strings:

var myName = fullName

15 of 26

Strings:

var myIntroduction = “My name is “ + fullName

16 of 26

Numbers:

1 + 6

6 - 1

7 * 7

8 / 4

17 of 26

Numbers:

var myAge = 29

dadAge = 58

myAge + dadAge

18 of 26

Alert

alert(“I’m sorry Dave, I can’t do that.”)

19 of 26

Alert

alert(myAge + 7)

20 of 26

jQuery

http://bit.ly/JSNICAR2015

21 of 26

jQuery

document.ready

22 of 26

jQuery

.click

.css

so many more!

23 of 26

If else

if (myAge < 29) {

alert(‘You’re younger than 29, ‘ + fullName);

} else {

alert(‘You’re older than or equal to 29, ‘ + fullName);

}

24 of 26

For loops

Check out the example to see some for loopin action!

25 of 26

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?

26 of 26

Andy Boyle

NBC News Breaking News,

Full-Stack Developer

@andymboyle

#NICAR2015

andymboyle@gmail.com