1. Build a Guessing Game
with JavaScript
January 2018
bit.ly/game-js-phx
codepen.io
1
2. About us
Jessica Cottrell, Host
Program Manager, Executive Education, ASU
Thinkful Student
Joe Previte
Digital Marketer, Software Engineer
Thinkful Instructor
Dave Hoel
Software Engineer
Thinkful Grad
2
3. About you
What's your name?
What brought you here today?
What is your programming experience?
Wifi: MakeOffices 5Ghz
Password: Internet!23
http://bit.ly/js-game-dc
3
4. About Thinkful
We train developers and data scientists
through 1x1 mentorship and project-based
learning.
Guaranteed.Guaranteed.
4
5. This is what we're making
View example here
Wifi: MakeOffices 5Ghz
Password: Internet!23
http://bit.ly/js-game-dc
5
6. Defining a variable with JavaScript
var numberOfSheep = 20
Initialize variable
Name of variable
Value of variable
http://bit.ly/tf-js-game-atlhttp://bit.ly/js-game-dc
Wifi: MakeOffices 5Ghz
Password: Internet!23
http://bit.ly/js-game-dc
6
8. Declaring a function with JavaScript
function greet() {
return "Hello world!";
}
Initialize function Name of function
What the function does
Wi-Fi: IgniteHQ
Password: igniteHQ
http://bit.ly/tf-js-game-atlWifi: MakeOffices 5Ghz
Password: Internet!23 8
http://bit.ly/js-game-dc
10. If/else statements
go to gas stationkeep driving
if false if true
need gas?
family roadtrip
Wifi: MakeOffices 5Ghz
Password: Internet!23
http://bit.ly/js-game-dc
10
14. Parameters within functions
function adder(a, b) {
return a + b;
}
adder(1,2);
Parameters in declaration
Parameters used
within the function
Wifi: MakeOffices 5Ghz
Password: Internet!23
http://bit.ly/js-game-dc
14
15. Examples of parameters within functions
Wifi: MakeOffices 5Ghz
Password: Internet!23
http://bit.ly/js-game-dc
15
16. Real developers use Google... a lot
Wifi: MakeOffices 5Ghz
Password: Internet!23
http://bit.ly/js-game-dc
16
20. Thinkful's Free Course
Access to four weeks of curriculum for
two weeks
HTML, CSS and JavaScript
Unlimited mentor-led Q&A sessions
Personal Program Manager
Option to continue on to the full program
at a prorated rate!
bit.ly/web-dev-freebit.ly/web-dev-free
20