SlideShare a Scribd company logo
Intro to Javascript
February 2018
Wifi: MakeOffices 5Ghz
Password: Internet!23
http://bit.ly/js-intro-dc
1
Instructor
TJ Stalcup
Lead Mentor @Thinkful (3yr)
API Evangelist @WealthEngine (3y)
JS Developer (22y)
Pokemon Master
TAs
http://bit.ly/js-intro-dc
WiFi: MakeOffices 5Ghz / Internet!23 2
About you
What's your name?
What brought you here today?
What is your programming experience?
bit.ly/js-intro-dcWiFi: MakeOffices 5Ghz
Password: Internet!23 bit.ly/js-intro-dcWiFi: IN3Guest
3
bit.ly/js-intro-dcWiFi: IN3Guest
bit.ly/js-intro-dcWiFi: In3Guest
http://bit.ly/js-intro-dc
WiFi: MakeOffices 5Ghz / Internet!23
About Thinkful
Thinkful helps people become developers and data
scientists through 1-on-1 mentorship and project-based
learning
These workshops are built using this approach.These workshops are built using this approach.
4
http://bit.ly/js-intro-dc
WiFi: MakeOffices 5Ghz / Internet!23
Take advantage of our support
Don't get discouraged, struggle leads to masterystruggle leads to mastery
Don't be shy, take full advantage of our supporttake full advantage of our support
http://bit.ly/js-intro-dc
WiFi: MakeOffices 5Ghz / Internet!23 5
Agenda
Learn key Javascript concepts (30 min)
Go over assignments (10 min)
Complete assignments with our support! (30 min)
Go over answer key (10 min)
Steps to continue learning (10 min)
http://bit.ly/js-intro-dc
WiFi: MakeOffices 5Ghz / Internet!23 6
How the web works
Type a URL from a client (e.g. google.com)​
Browser sends an HTTP request asking for specific files
Browser receives those files and renders them as a website
bit.ly/js-intro-dcWiFi: MakeOffices 5Ghz
Password: Internet!23
http://bit.ly/js-intro-dc
WiFi: MakeOffices 5Ghz / Internet!23 7
Client/Servers
Client (sends requests)
Frontend Developer
Manages what user sees
Server (sends response)
Backend Developer
Manages what app does
bit.ly/js-intro-dcWiFi: MakeOffices 5Ghz
Password: Internet!23
bit.ly/js-intro-dc
8
bit.ly/js-intro-dc
WiFi: MakeOffices 5Ghz
Password: Internet!23
bit.ly/js-intro-dcWiFi: IN3Guest
bit.ly/js-intro-dcWiFi: IN3Guest
bit.ly/js-intro-dcWiFi: In3Guest
http://bit.ly/js-intro-dc
WiFi: MakeOffices 5Ghz / Internet!23
Example: facebook.com
Client Server
Open browser
and navigate to
facebook.com
HTML, CSS, &
Javascript render
newsfeed
Request
Response
Algorithm
determines
content of feed.
Sends back
HTML, CSS,
Javascript files
Application LogicApplication Logic
Initial requestInitial request
Following responseFollowing response
We'll be writing Javascript, the code
that the browser uses to run the app
9
bit.ly/js-intro-dcWiFi: MakeOffices 5Ghz
Password: Internet!23
http://bit.ly/js-intro-dc
WiFi: MakeOffices 5Ghz / Internet!23
History of Javascript
Written by Brendan Eich in 1995 for Netscape
Initial version written in 10 days
Completely unrelated to Java, but maybe named after it to
draft off its popularity
Over 10 years, became default programming language for
browsers
Continues to evolve under guidance of ECMA International,
with input from top tech companies
bit.ly/js-intro-dcWiFi: MakeOffices 5Ghz
Password: Internet!23
http://bit.ly/js-intro-dc
WiFi: MakeOffices 5Ghz / Internet!23 10
Javascript today
Has large community of developers, libraries and
frameworks
Lots of job opportunities
Also the syntax is easier to understand for first-time
developers
bit.ly/js-intro-dcWiFi: MakeOffices 5Ghz
Password: Internet!23
bit.ly/js-intro-dc bit.ly/js-intro-dc
11
WiFi: MakeOffices 5Ghz
Password: Internet!23
bit.ly/js-intro-dcWiFi: IN3Guest
bit.ly/js-intro-dcWiFi: IN3Guest
bit.ly/js-intro-dcWiFi: In3Guest
http://bit.ly/js-intro-dc
WiFi: MakeOffices 5Ghz / Internet!23
Real developers use Google... a lot
bit.ly/js-intro-dcWiFi: MakeOffices 5Ghz
Password: Internet!23
http://bit.ly/js-intro-dc
WiFi: MakeOffices 5Ghz / Internet!23 12
Defining a variable with Javascript
var numberOfSheep = 20
Initialize variable
Name of variable
Value of variable
bit.ly/js-intro-dcWiFi: MakeOffices 5Ghz
Password: Internet!23
http://bit.ly/js-intro-dc
WiFi: MakeOffices 5Ghz / Internet!23 13
Variable examples
bit.ly/js-intro-dc
JSBin.com
WiFi: MakeOffices 5Ghz
Password: Internet!23
bit.ly/js-intro-dc
14
bit.ly/js-intro-dc
WiFi: MakeOffices 5Ghz
Password: Internet!23
bit.ly/js-intro-dcWiFi: IN3Guest
bit.ly/js-intro-dcWiFi: IN3Guest
bit.ly/js-intro-dcWiFi: In3Guest
http://bit.ly/js-intro-dc
WiFi: MakeOffices 5Ghz / Internet!23
Declaring a function with Javascript
function greet() {
return "Hello world!";
}
Initialize function Name of function
What the function does
bit.ly/js-intro-dcWiFi: MakeOffices 5Ghz
Password: Internet!23
bit.ly/js-intro-dc
15
bit.ly/js-intro-dc
WiFi: MakeOffices 5Ghz
Password: Internet!23
bit.ly/js-intro-dc
bit.ly/js-intro-dcWiFi: IN3Guest
bit.ly/js-intro-dc
http://bit.ly/js-intro-dc
WiFi: MakeOffices 5Ghz / Internet!23
Parameters within functions
function adder(a, b) {
return a + b;
}
adder(1,2);
Parameters in declaration
Parameters used
within the function
bit.ly/ js-intro-dcWiFi: MakeOffices 5Ghz
Password: Internet!23 bit.ly/js-intro-dcWiFi: In3Guest
16bit.ly/js-intro-dcWiFi: MakeOffices 5Ghzbit.ly/js-intro-dc bit.ly/js-intro-dcWiFi: MakeOffices 5Ghz
Password: Internet!23 bit.ly/js-intro-dcWiFi: IN3Guest
bit.ly/js-intro-dcWiFi: IN3Guest
bit.ly/js-intro-dcWiFi: In3Guest
http://bit.ly/js-intro-dc
WiFi: MakeOffices 5Ghz / Internet!23
Examples of parameters within functions
bit.ly/ js-intro-dc
JSBin.com
WiFi: MakeOffices 5Ghz
Password: Internet!23
bit.ly/js-intro-dc
17
bit.ly/js-intro-dcWiFi: MakeOffices 5Ghz
Password: Internet!23 bit.ly/js-intro-dc
bit.ly/js-intro-dcWiFi: IN3Guest
bit.ly/js-intro-dc
http://bit.ly/js-intro-dc
WiFi: MakeOffices 5Ghz / Internet!23
Repl.it setup & first steps!
http://bit.ly/tf-intro-js-challenges
bit.ly/js-intro-dcWiFi: MakeOffices 5Ghz
Password: Internet!23
http://bit.ly/js-intro-dc
WiFi: MakeOffices 5Ghz / Internet!23 18
if/else Statements
go to gas stationkeep driving
if false if true
need gas?
family roadtrip
bit.ly/js-intro-dcWiFi: MakeOffices 5Ghz
Password: Internet!23
http://bit.ly/js-intro-dc
WiFi: MakeOffices 5Ghz / Internet!23 19
Comparing Values
== (equal to)
5 == 5 --> true
5 == 6 --> false
!= (not equal to)
5 != 5 --> false
5 != 6 --> true
bit.ly/js-intro-dcWiFi: MakeOffices 5Ghz
Password: Internet!23
bit.ly/js-intro-dc
20
bit.ly/js-intro-dc
WiFi: MakeOffices 5Ghz
Password: Internet!23
bit.ly/js-intro-dcWiFi: IN3Guest
bit.ly/js-intro-dcWiFi: IN3Guest
bit.ly/js-intro-dcWiFi: In3Guest
http://bit.ly/js-intro-dc
WiFi: MakeOffices 5Ghz / Internet!23
if/else Statements
function familyRoadtrip() {
if (needGas == true) {
getGas();
}
else {
keepDriving();
}
}
bit.ly/js-intro-dcWiFi: MakeOffices 5Ghz
Password: Internet!23
bit.ly/js-intro-dc
21
bit.ly/js-intro-dc
WiFi: MakeOffices 5Ghz
Password: Internet!23
bit.ly/js-intro-dcWiFi: IN3Guest
bit.ly/js-intro-dcWiFi: IN3Guest
bit.ly/js-intro-dcWiFi: In3Guest
http://bit.ly/js-intro-dc
WiFi: MakeOffices 5Ghz / Internet!23
if/else Statements
bit.ly/ js-intro-dc
JSBin.com
WiFi: MakeOffices 5Ghz
Password: Internet!23
bit.ly/js-intro-dcWiFi: In3Guest
bit.ly/js-intro-dcWiFi: MakeOffices 5Ghz 22
bit.ly/js-intro-dc bit.ly/js-intro-dcWiFi: MakeOffices 5Ghz
Password: Internet!23 bit.ly/js-intro-dc
bit.ly/js-intro-dcWiFi: IN3Guest
bit.ly/js-intro-dc
bit.ly/js-intro-dc
Exercise Solutions
http://bit.ly/intro-js-solutions​
bit.ly/ js-intro-dcWiFi: MakeOffices 5Ghz
Password: Internet!23
bit.ly/js-intro-dc
23

More Related Content

PDF
Intro to JavaScript
PDF
Introduction to JavaScript, Washington, DC February 2018
PDF
Intro to Javascript
PDF
Intro to JavaScript - Thinkful DC
PDF
Build a Game with Javascript
PDF
Intro to Python
PDF
Build a Game with Javascript
PDF
Thinkful DC - Intro to JavaScript
Intro to JavaScript
Introduction to JavaScript, Washington, DC February 2018
Intro to Javascript
Intro to JavaScript - Thinkful DC
Build a Game with Javascript
Intro to Python
Build a Game with Javascript
Thinkful DC - Intro to JavaScript

What's hot (20)

PDF
Thinkful FrontEnd Crash Course - HTML & CSS
PDF
Intro to js august 31
PDF
Thinkful FrontEnd Crash Course - HTML & CSS
PDF
Thinkful DC FrontEnd Crash Course - HTML & CSS
PDF
Frontend Crash Course
PDF
Thinkful build a website (html, css)
PDF
Frontend Crash Course
PDF
Frontend Crash Course
PDF
itjsbagg410
PDF
Frontend Crash Course
PDF
Deck 8983a1d9-68df-4447-8481-3b4fd0de734c-13-37
PDF
Deck 8983a1d9-68df-4447-8481-3b4fd0de734c-9-28
PDF
Virtually Anyone
PDF
Build your own Website
PDF
Build your Own Website with HTML/CSS
PDF
Build a Game with JavaScript - Thinkful DC
PDF
Deck 8983a1d9-68df-4447-8481-3b4fd0de734c-13-66
PDF
The Immersive Web
PDF
website la 11/28
PDF
Build a Game with Javascript
Thinkful FrontEnd Crash Course - HTML & CSS
Intro to js august 31
Thinkful FrontEnd Crash Course - HTML & CSS
Thinkful DC FrontEnd Crash Course - HTML & CSS
Frontend Crash Course
Thinkful build a website (html, css)
Frontend Crash Course
Frontend Crash Course
itjsbagg410
Frontend Crash Course
Deck 8983a1d9-68df-4447-8481-3b4fd0de734c-13-37
Deck 8983a1d9-68df-4447-8481-3b4fd0de734c-9-28
Virtually Anyone
Build your own Website
Build your Own Website with HTML/CSS
Build a Game with JavaScript - Thinkful DC
Deck 8983a1d9-68df-4447-8481-3b4fd0de734c-13-66
The Immersive Web
website la 11/28
Build a Game with Javascript
Ad

Similar to Thinkful DC - Intro to JavaScript (20)

PDF
Intro to JavaScript
PDF
Deck 893ff61f-1fb8-4e15-a379-775dfdbcee77-7-14
PDF
Deck 893ff61f-1fb8-4e15-a379-775dfdbcee77-7-14-55
PDF
Introjs2.13.18sd
PDF
Intro to JavaScript
PDF
Intro js3.22.18
PDF
Introjs1.9.18tf
PDF
Build a Game with JavaScript - Pasadena July
PDF
Deck 893ff61f-1fb8-4e15-a379-775dfdbcee77-7-14-55-78 (12)
PDF
Deck 8983a1d9-68df-4447-8481-3b4fd0de734c-9-52-74-451
PDF
Intro To JavaScript
PDF
Introjs10.5.17SD
PDF
Intro to JavaScript
PDF
Intro to JavaScript - LA - July
PDF
Deck 8983a1d9-68df-4447-8481-3b4fd0de734c-9-52
PDF
Deck 893ff61f-1fb8-4e15-a379-775dfdbcee77-7-14-55-78-171-219-304-310-388 (1)
PDF
Deck 8983a1d9-68df-4447-8481-3b4fd0de734c-9-52-74
PDF
Intro to js september 19
PDF
Ijsphx927
PDF
Itjs124
Intro to JavaScript
Deck 893ff61f-1fb8-4e15-a379-775dfdbcee77-7-14
Deck 893ff61f-1fb8-4e15-a379-775dfdbcee77-7-14-55
Introjs2.13.18sd
Intro to JavaScript
Intro js3.22.18
Introjs1.9.18tf
Build a Game with JavaScript - Pasadena July
Deck 893ff61f-1fb8-4e15-a379-775dfdbcee77-7-14-55-78 (12)
Deck 8983a1d9-68df-4447-8481-3b4fd0de734c-9-52-74-451
Intro To JavaScript
Introjs10.5.17SD
Intro to JavaScript
Intro to JavaScript - LA - July
Deck 8983a1d9-68df-4447-8481-3b4fd0de734c-9-52
Deck 893ff61f-1fb8-4e15-a379-775dfdbcee77-7-14-55-78-171-219-304-310-388 (1)
Deck 8983a1d9-68df-4447-8481-3b4fd0de734c-9-52-74
Intro to js september 19
Ijsphx927
Itjs124
Ad

More from TJ Stalcup (19)

PDF
Intro to Python for Data Science
PDF
Intro to Python for Data Science
PDF
Build Your Own Website - Intro to HTML & CSS
PDF
Intro to Python
PDF
Predict the Oscars using Data Science
PDF
Data Science Your Vacation
PDF
Data Science Your Vacation
PDF
Build Your Own Instagram Filters
PDF
Choosing a Programming Language
PDF
Build a Virtual Pet with JavaScript
PDF
DC jQuery App
PDF
Thinkful DC - Building a Virtual Pet with JavaScript
PDF
Thinkful - Intro to Data Science - Washington DC
PDF
Build Your Own Website - Thinkful DC
PDF
Build a Virtual Pet with JavaScript
PDF
Thinkful - Frontend Crash Course - Intro to HTML/CSS
PDF
Intro to Data Science
PDF
Thinkful - Intro to JavaScript
PDF
Thinkful - HTML/CSS Crash Course (May 4 2017)
Intro to Python for Data Science
Intro to Python for Data Science
Build Your Own Website - Intro to HTML & CSS
Intro to Python
Predict the Oscars using Data Science
Data Science Your Vacation
Data Science Your Vacation
Build Your Own Instagram Filters
Choosing a Programming Language
Build a Virtual Pet with JavaScript
DC jQuery App
Thinkful DC - Building a Virtual Pet with JavaScript
Thinkful - Intro to Data Science - Washington DC
Build Your Own Website - Thinkful DC
Build a Virtual Pet with JavaScript
Thinkful - Frontend Crash Course - Intro to HTML/CSS
Intro to Data Science
Thinkful - Intro to JavaScript
Thinkful - HTML/CSS Crash Course (May 4 2017)

Recently uploaded (20)

DOCX
The AUB Centre for AI in Media Proposal.docx
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PDF
Electronic commerce courselecture one. Pdf
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
Network Security Unit 5.pdf for BCA BBA.
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PPTX
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
PPTX
MYSQL Presentation for SQL database connectivity
PDF
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
PDF
Encapsulation theory and applications.pdf
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
The AUB Centre for AI in Media Proposal.docx
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
“AI and Expert System Decision Support & Business Intelligence Systems”
Mobile App Security Testing_ A Comprehensive Guide.pdf
Building Integrated photovoltaic BIPV_UPV.pdf
Chapter 3 Spatial Domain Image Processing.pdf
Advanced methodologies resolving dimensionality complications for autism neur...
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
Electronic commerce courselecture one. Pdf
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Network Security Unit 5.pdf for BCA BBA.
Dropbox Q2 2025 Financial Results & Investor Presentation
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
MYSQL Presentation for SQL database connectivity
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
Encapsulation theory and applications.pdf
The Rise and Fall of 3GPP – Time for a Sabbatical?
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf

Thinkful DC - Intro to JavaScript

  • 1. Intro to Javascript February 2018 Wifi: MakeOffices 5Ghz Password: Internet!23 http://bit.ly/js-intro-dc 1
  • 2. Instructor TJ Stalcup Lead Mentor @Thinkful (3yr) API Evangelist @WealthEngine (3y) JS Developer (22y) Pokemon Master TAs http://bit.ly/js-intro-dc WiFi: MakeOffices 5Ghz / Internet!23 2
  • 3. About you What's your name? What brought you here today? What is your programming experience? bit.ly/js-intro-dcWiFi: MakeOffices 5Ghz Password: Internet!23 bit.ly/js-intro-dcWiFi: IN3Guest 3 bit.ly/js-intro-dcWiFi: IN3Guest bit.ly/js-intro-dcWiFi: In3Guest http://bit.ly/js-intro-dc WiFi: MakeOffices 5Ghz / Internet!23
  • 4. About Thinkful Thinkful helps people become developers and data scientists through 1-on-1 mentorship and project-based learning These workshops are built using this approach.These workshops are built using this approach. 4 http://bit.ly/js-intro-dc WiFi: MakeOffices 5Ghz / Internet!23
  • 5. Take advantage of our support Don't get discouraged, struggle leads to masterystruggle leads to mastery Don't be shy, take full advantage of our supporttake full advantage of our support http://bit.ly/js-intro-dc WiFi: MakeOffices 5Ghz / Internet!23 5
  • 6. Agenda Learn key Javascript concepts (30 min) Go over assignments (10 min) Complete assignments with our support! (30 min) Go over answer key (10 min) Steps to continue learning (10 min) http://bit.ly/js-intro-dc WiFi: MakeOffices 5Ghz / Internet!23 6
  • 7. How the web works Type a URL from a client (e.g. google.com)​ Browser sends an HTTP request asking for specific files Browser receives those files and renders them as a website bit.ly/js-intro-dcWiFi: MakeOffices 5Ghz Password: Internet!23 http://bit.ly/js-intro-dc WiFi: MakeOffices 5Ghz / Internet!23 7
  • 8. Client/Servers Client (sends requests) Frontend Developer Manages what user sees Server (sends response) Backend Developer Manages what app does bit.ly/js-intro-dcWiFi: MakeOffices 5Ghz Password: Internet!23 bit.ly/js-intro-dc 8 bit.ly/js-intro-dc WiFi: MakeOffices 5Ghz Password: Internet!23 bit.ly/js-intro-dcWiFi: IN3Guest bit.ly/js-intro-dcWiFi: IN3Guest bit.ly/js-intro-dcWiFi: In3Guest http://bit.ly/js-intro-dc WiFi: MakeOffices 5Ghz / Internet!23
  • 9. Example: facebook.com Client Server Open browser and navigate to facebook.com HTML, CSS, & Javascript render newsfeed Request Response Algorithm determines content of feed. Sends back HTML, CSS, Javascript files Application LogicApplication Logic Initial requestInitial request Following responseFollowing response We'll be writing Javascript, the code that the browser uses to run the app 9 bit.ly/js-intro-dcWiFi: MakeOffices 5Ghz Password: Internet!23 http://bit.ly/js-intro-dc WiFi: MakeOffices 5Ghz / Internet!23
  • 10. History of Javascript Written by Brendan Eich in 1995 for Netscape Initial version written in 10 days Completely unrelated to Java, but maybe named after it to draft off its popularity Over 10 years, became default programming language for browsers Continues to evolve under guidance of ECMA International, with input from top tech companies bit.ly/js-intro-dcWiFi: MakeOffices 5Ghz Password: Internet!23 http://bit.ly/js-intro-dc WiFi: MakeOffices 5Ghz / Internet!23 10
  • 11. Javascript today Has large community of developers, libraries and frameworks Lots of job opportunities Also the syntax is easier to understand for first-time developers bit.ly/js-intro-dcWiFi: MakeOffices 5Ghz Password: Internet!23 bit.ly/js-intro-dc bit.ly/js-intro-dc 11 WiFi: MakeOffices 5Ghz Password: Internet!23 bit.ly/js-intro-dcWiFi: IN3Guest bit.ly/js-intro-dcWiFi: IN3Guest bit.ly/js-intro-dcWiFi: In3Guest http://bit.ly/js-intro-dc WiFi: MakeOffices 5Ghz / Internet!23
  • 12. Real developers use Google... a lot bit.ly/js-intro-dcWiFi: MakeOffices 5Ghz Password: Internet!23 http://bit.ly/js-intro-dc WiFi: MakeOffices 5Ghz / Internet!23 12
  • 13. Defining a variable with Javascript var numberOfSheep = 20 Initialize variable Name of variable Value of variable bit.ly/js-intro-dcWiFi: MakeOffices 5Ghz Password: Internet!23 http://bit.ly/js-intro-dc WiFi: MakeOffices 5Ghz / Internet!23 13
  • 14. Variable examples bit.ly/js-intro-dc JSBin.com WiFi: MakeOffices 5Ghz Password: Internet!23 bit.ly/js-intro-dc 14 bit.ly/js-intro-dc WiFi: MakeOffices 5Ghz Password: Internet!23 bit.ly/js-intro-dcWiFi: IN3Guest bit.ly/js-intro-dcWiFi: IN3Guest bit.ly/js-intro-dcWiFi: In3Guest http://bit.ly/js-intro-dc WiFi: MakeOffices 5Ghz / Internet!23
  • 15. Declaring a function with Javascript function greet() { return "Hello world!"; } Initialize function Name of function What the function does bit.ly/js-intro-dcWiFi: MakeOffices 5Ghz Password: Internet!23 bit.ly/js-intro-dc 15 bit.ly/js-intro-dc WiFi: MakeOffices 5Ghz Password: Internet!23 bit.ly/js-intro-dc bit.ly/js-intro-dcWiFi: IN3Guest bit.ly/js-intro-dc http://bit.ly/js-intro-dc WiFi: MakeOffices 5Ghz / Internet!23
  • 16. Parameters within functions function adder(a, b) { return a + b; } adder(1,2); Parameters in declaration Parameters used within the function bit.ly/ js-intro-dcWiFi: MakeOffices 5Ghz Password: Internet!23 bit.ly/js-intro-dcWiFi: In3Guest 16bit.ly/js-intro-dcWiFi: MakeOffices 5Ghzbit.ly/js-intro-dc bit.ly/js-intro-dcWiFi: MakeOffices 5Ghz Password: Internet!23 bit.ly/js-intro-dcWiFi: IN3Guest bit.ly/js-intro-dcWiFi: IN3Guest bit.ly/js-intro-dcWiFi: In3Guest http://bit.ly/js-intro-dc WiFi: MakeOffices 5Ghz / Internet!23
  • 17. Examples of parameters within functions bit.ly/ js-intro-dc JSBin.com WiFi: MakeOffices 5Ghz Password: Internet!23 bit.ly/js-intro-dc 17 bit.ly/js-intro-dcWiFi: MakeOffices 5Ghz Password: Internet!23 bit.ly/js-intro-dc bit.ly/js-intro-dcWiFi: IN3Guest bit.ly/js-intro-dc http://bit.ly/js-intro-dc WiFi: MakeOffices 5Ghz / Internet!23
  • 18. Repl.it setup & first steps! http://bit.ly/tf-intro-js-challenges bit.ly/js-intro-dcWiFi: MakeOffices 5Ghz Password: Internet!23 http://bit.ly/js-intro-dc WiFi: MakeOffices 5Ghz / Internet!23 18
  • 19. if/else Statements go to gas stationkeep driving if false if true need gas? family roadtrip bit.ly/js-intro-dcWiFi: MakeOffices 5Ghz Password: Internet!23 http://bit.ly/js-intro-dc WiFi: MakeOffices 5Ghz / Internet!23 19
  • 20. Comparing Values == (equal to) 5 == 5 --> true 5 == 6 --> false != (not equal to) 5 != 5 --> false 5 != 6 --> true bit.ly/js-intro-dcWiFi: MakeOffices 5Ghz Password: Internet!23 bit.ly/js-intro-dc 20 bit.ly/js-intro-dc WiFi: MakeOffices 5Ghz Password: Internet!23 bit.ly/js-intro-dcWiFi: IN3Guest bit.ly/js-intro-dcWiFi: IN3Guest bit.ly/js-intro-dcWiFi: In3Guest http://bit.ly/js-intro-dc WiFi: MakeOffices 5Ghz / Internet!23
  • 21. if/else Statements function familyRoadtrip() { if (needGas == true) { getGas(); } else { keepDriving(); } } bit.ly/js-intro-dcWiFi: MakeOffices 5Ghz Password: Internet!23 bit.ly/js-intro-dc 21 bit.ly/js-intro-dc WiFi: MakeOffices 5Ghz Password: Internet!23 bit.ly/js-intro-dcWiFi: IN3Guest bit.ly/js-intro-dcWiFi: IN3Guest bit.ly/js-intro-dcWiFi: In3Guest http://bit.ly/js-intro-dc WiFi: MakeOffices 5Ghz / Internet!23
  • 22. if/else Statements bit.ly/ js-intro-dc JSBin.com WiFi: MakeOffices 5Ghz Password: Internet!23 bit.ly/js-intro-dcWiFi: In3Guest bit.ly/js-intro-dcWiFi: MakeOffices 5Ghz 22 bit.ly/js-intro-dc bit.ly/js-intro-dcWiFi: MakeOffices 5Ghz Password: Internet!23 bit.ly/js-intro-dc bit.ly/js-intro-dcWiFi: IN3Guest bit.ly/js-intro-dc bit.ly/js-intro-dc