SlideShare une entreprise Scribd logo
1  sur  23
Télécharger pour lire hors ligne
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

Contenu connexe

Tendances

Thinkful FrontEnd Crash Course - HTML & CSS
Thinkful FrontEnd Crash Course - HTML & CSSThinkful FrontEnd Crash Course - HTML & CSS
Thinkful FrontEnd Crash Course - HTML & CSSTJ Stalcup
 
Intro to js august 31
Intro to js august 31Intro to js august 31
Intro to js august 31Thinkful
 
Thinkful FrontEnd Crash Course - HTML & CSS
Thinkful FrontEnd Crash Course - HTML & CSSThinkful FrontEnd Crash Course - HTML & CSS
Thinkful FrontEnd Crash Course - HTML & CSSTJ Stalcup
 
Thinkful DC FrontEnd Crash Course - HTML & CSS
Thinkful DC FrontEnd Crash Course - HTML & CSSThinkful DC FrontEnd Crash Course - HTML & CSS
Thinkful DC FrontEnd Crash Course - HTML & CSSTJ Stalcup
 
Thinkful build a website (html, css)
Thinkful build a website (html, css)Thinkful build a website (html, css)
Thinkful build a website (html, css)Thinkful
 
Frontend Crash Course
Frontend Crash CourseFrontend Crash Course
Frontend Crash CourseTJ Stalcup
 
Frontend Crash Course
Frontend Crash CourseFrontend Crash Course
Frontend Crash CourseTJ Stalcup
 
Deck 8983a1d9-68df-4447-8481-3b4fd0de734c-13-37
Deck 8983a1d9-68df-4447-8481-3b4fd0de734c-13-37Deck 8983a1d9-68df-4447-8481-3b4fd0de734c-13-37
Deck 8983a1d9-68df-4447-8481-3b4fd0de734c-13-37Thinkful
 
Deck 8983a1d9-68df-4447-8481-3b4fd0de734c-9-28
Deck 8983a1d9-68df-4447-8481-3b4fd0de734c-9-28Deck 8983a1d9-68df-4447-8481-3b4fd0de734c-9-28
Deck 8983a1d9-68df-4447-8481-3b4fd0de734c-9-28Thinkful
 
Virtually Anyone
Virtually AnyoneVirtually Anyone
Virtually AnyoneTony Parisi
 
Build your own Website
Build your own WebsiteBuild your own Website
Build your own WebsiteAaron Lamphere
 
Build your Own Website with HTML/CSS
Build your Own Website with HTML/CSSBuild your Own Website with HTML/CSS
Build your Own Website with HTML/CSSAaron Lamphere
 
Build a Game with JavaScript - Thinkful DC
Build a Game with JavaScript - Thinkful DCBuild a Game with JavaScript - Thinkful DC
Build a Game with JavaScript - Thinkful DCTJ Stalcup
 
Deck 8983a1d9-68df-4447-8481-3b4fd0de734c-13-66
Deck 8983a1d9-68df-4447-8481-3b4fd0de734c-13-66Deck 8983a1d9-68df-4447-8481-3b4fd0de734c-13-66
Deck 8983a1d9-68df-4447-8481-3b4fd0de734c-13-66Ivy Rueb
 
The Immersive Web
The Immersive WebThe Immersive Web
The Immersive WebTony Parisi
 
website la 11/28
website la 11/28website la 11/28
website la 11/28Thinkful
 
Build a Game with Javascript
Build a Game with Javascript Build a Game with Javascript
Build a Game with Javascript Ivy Rueb
 

Tendances (20)

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

Similaire à Thinkful DC - Intro to JavaScript

Intro to Python
Intro to PythonIntro to Python
Intro to PythonTJ Stalcup
 
Intro to js september 19
Intro to js september 19Intro to js september 19
Intro to js september 19Thinkful
 
Deck 893ff61f-1fb8-4e15-a379-775dfdbcee77-7-14
Deck 893ff61f-1fb8-4e15-a379-775dfdbcee77-7-14Deck 893ff61f-1fb8-4e15-a379-775dfdbcee77-7-14
Deck 893ff61f-1fb8-4e15-a379-775dfdbcee77-7-14Thinkful
 
Intro To JavaScript
Intro To JavaScriptIntro To JavaScript
Intro To JavaScriptIvy Rueb
 
Intro To JavaScript
Intro To JavaScriptIntro To JavaScript
Intro To JavaScriptIvy Rueb
 
Deck 8983a1d9-68df-4447-8481-3b4fd0de734c-9-52-74
Deck 8983a1d9-68df-4447-8481-3b4fd0de734c-9-52-74Deck 8983a1d9-68df-4447-8481-3b4fd0de734c-9-52-74
Deck 8983a1d9-68df-4447-8481-3b4fd0de734c-9-52-74Ivy Rueb
 
Deck 893ff61f-1fb8-4e15-a379-775dfdbcee77-7-14-55
Deck 893ff61f-1fb8-4e15-a379-775dfdbcee77-7-14-55Deck 893ff61f-1fb8-4e15-a379-775dfdbcee77-7-14-55
Deck 893ff61f-1fb8-4e15-a379-775dfdbcee77-7-14-55Ivy Rueb
 
Intro to JavaScript - LA - July
Intro to JavaScript - LA - JulyIntro to JavaScript - LA - July
Intro to JavaScript - LA - JulyThinkful
 
Build your Own Twitter bot 09/20
Build your Own Twitter bot 09/20Build your Own Twitter bot 09/20
Build your Own Twitter bot 09/20Ivy Rueb
 
Build your own Website
Build your own WebsiteBuild your own Website
Build your own WebsiteAaron Lamphere
 
Deck 8983a1d9-68df-4447-8481-3b4fd0de734c-9-52-74
Deck 8983a1d9-68df-4447-8481-3b4fd0de734c-9-52-74Deck 8983a1d9-68df-4447-8481-3b4fd0de734c-9-52-74
Deck 8983a1d9-68df-4447-8481-3b4fd0de734c-9-52-74Ivy Rueb
 
Deck 8983a1d9-68df-4447-8481-3b4fd0de734c-9-52
Deck 8983a1d9-68df-4447-8481-3b4fd0de734c-9-52Deck 8983a1d9-68df-4447-8481-3b4fd0de734c-9-52
Deck 8983a1d9-68df-4447-8481-3b4fd0de734c-9-52Ivy Rueb
 
Build a Game with JavaScript - Pasadena July
Build a Game with JavaScript - Pasadena JulyBuild a Game with JavaScript - Pasadena July
Build a Game with JavaScript - Pasadena JulyThinkful
 

Similaire à Thinkful DC - Intro to JavaScript (17)

Intro to Python
Intro to PythonIntro to Python
Intro to Python
 
Intro to js september 19
Intro to js september 19Intro to js september 19
Intro to js september 19
 
Deck 893ff61f-1fb8-4e15-a379-775dfdbcee77-7-14
Deck 893ff61f-1fb8-4e15-a379-775dfdbcee77-7-14Deck 893ff61f-1fb8-4e15-a379-775dfdbcee77-7-14
Deck 893ff61f-1fb8-4e15-a379-775dfdbcee77-7-14
 
Intro To JavaScript
Intro To JavaScriptIntro To JavaScript
Intro To JavaScript
 
Intro To JavaScript
Intro To JavaScriptIntro To JavaScript
Intro To JavaScript
 
Deck 8983a1d9-68df-4447-8481-3b4fd0de734c-9-52-74
Deck 8983a1d9-68df-4447-8481-3b4fd0de734c-9-52-74Deck 8983a1d9-68df-4447-8481-3b4fd0de734c-9-52-74
Deck 8983a1d9-68df-4447-8481-3b4fd0de734c-9-52-74
 
Intro to JavaScript
Intro to JavaScriptIntro to JavaScript
Intro to JavaScript
 
Intro to JavaScript
Intro to JavaScriptIntro to JavaScript
Intro to JavaScript
 
Deck 893ff61f-1fb8-4e15-a379-775dfdbcee77-7-14-55
Deck 893ff61f-1fb8-4e15-a379-775dfdbcee77-7-14-55Deck 893ff61f-1fb8-4e15-a379-775dfdbcee77-7-14-55
Deck 893ff61f-1fb8-4e15-a379-775dfdbcee77-7-14-55
 
Intro to JavaScript - LA - July
Intro to JavaScript - LA - JulyIntro to JavaScript - LA - July
Intro to JavaScript - LA - July
 
IJS821
IJS821IJS821
IJS821
 
Intro to JavaScript
Intro to JavaScriptIntro to JavaScript
Intro to JavaScript
 
Build your Own Twitter bot 09/20
Build your Own Twitter bot 09/20Build your Own Twitter bot 09/20
Build your Own Twitter bot 09/20
 
Build your own Website
Build your own WebsiteBuild your own Website
Build your own Website
 
Deck 8983a1d9-68df-4447-8481-3b4fd0de734c-9-52-74
Deck 8983a1d9-68df-4447-8481-3b4fd0de734c-9-52-74Deck 8983a1d9-68df-4447-8481-3b4fd0de734c-9-52-74
Deck 8983a1d9-68df-4447-8481-3b4fd0de734c-9-52-74
 
Deck 8983a1d9-68df-4447-8481-3b4fd0de734c-9-52
Deck 8983a1d9-68df-4447-8481-3b4fd0de734c-9-52Deck 8983a1d9-68df-4447-8481-3b4fd0de734c-9-52
Deck 8983a1d9-68df-4447-8481-3b4fd0de734c-9-52
 
Build a Game with JavaScript - Pasadena July
Build a Game with JavaScript - Pasadena JulyBuild a Game with JavaScript - Pasadena July
Build a Game with JavaScript - Pasadena July
 

Plus de TJ Stalcup

Intro to Python for Data Science
Intro to Python for Data ScienceIntro to Python for Data Science
Intro to Python for Data ScienceTJ Stalcup
 
Intro to Python for Data Science
Intro to Python for Data ScienceIntro to Python for Data Science
Intro to Python for Data ScienceTJ Stalcup
 
Build Your Own Website - Intro to HTML & CSS
Build Your Own Website - Intro to HTML & CSSBuild Your Own Website - Intro to HTML & CSS
Build Your Own Website - Intro to HTML & CSSTJ Stalcup
 
Predict the Oscars using Data Science
Predict the Oscars using Data SciencePredict the Oscars using Data Science
Predict the Oscars using Data ScienceTJ Stalcup
 
Data Science Your Vacation
Data Science Your VacationData Science Your Vacation
Data Science Your VacationTJ Stalcup
 
Data Science Your Vacation
Data Science Your VacationData Science Your Vacation
Data Science Your VacationTJ Stalcup
 
Build Your Own Instagram Filters
Build Your Own Instagram FiltersBuild Your Own Instagram Filters
Build Your Own Instagram FiltersTJ Stalcup
 
Choosing a Programming Language
Choosing a Programming LanguageChoosing a Programming Language
Choosing a Programming LanguageTJ Stalcup
 
Build a Virtual Pet with JavaScript
Build a Virtual Pet with JavaScriptBuild a Virtual Pet with JavaScript
Build a Virtual Pet with JavaScriptTJ Stalcup
 
Thinkful DC - Building a Virtual Pet with JavaScript
Thinkful DC - Building a Virtual Pet with JavaScriptThinkful DC - Building a Virtual Pet with JavaScript
Thinkful DC - Building a Virtual Pet with JavaScriptTJ Stalcup
 
Thinkful - Intro to Data Science - Washington DC
Thinkful - Intro to Data Science - Washington DCThinkful - Intro to Data Science - Washington DC
Thinkful - Intro to Data Science - Washington DCTJ Stalcup
 
Build Your Own Website - Thinkful DC
Build Your Own Website - Thinkful DCBuild Your Own Website - Thinkful DC
Build Your Own Website - Thinkful DCTJ Stalcup
 
Build a Virtual Pet with JavaScript
Build a Virtual Pet with JavaScriptBuild a Virtual Pet with JavaScript
Build a Virtual Pet with JavaScriptTJ Stalcup
 
Thinkful - Frontend Crash Course - Intro to HTML/CSS
Thinkful - Frontend Crash Course - Intro to HTML/CSSThinkful - Frontend Crash Course - Intro to HTML/CSS
Thinkful - Frontend Crash Course - Intro to HTML/CSSTJ Stalcup
 
Intro to Data Science
Intro to Data ScienceIntro to Data Science
Intro to Data ScienceTJ Stalcup
 
Thinkful - Intro to JavaScript
Thinkful - Intro to JavaScriptThinkful - Intro to JavaScript
Thinkful - Intro to JavaScriptTJ Stalcup
 
Thinkful - HTML/CSS Crash Course (May 4 2017)
Thinkful - HTML/CSS Crash Course (May 4 2017)Thinkful - HTML/CSS Crash Course (May 4 2017)
Thinkful - HTML/CSS Crash Course (May 4 2017)TJ Stalcup
 

Plus de TJ Stalcup (18)

Intro to Python for Data Science
Intro to Python for Data ScienceIntro to Python for Data Science
Intro to Python for Data Science
 
Intro to Python for Data Science
Intro to Python for Data ScienceIntro to Python for Data Science
Intro to Python for Data Science
 
Build Your Own Website - Intro to HTML & CSS
Build Your Own Website - Intro to HTML & CSSBuild Your Own Website - Intro to HTML & CSS
Build Your Own Website - Intro to HTML & CSS
 
Predict the Oscars using Data Science
Predict the Oscars using Data SciencePredict the Oscars using Data Science
Predict the Oscars using Data Science
 
Data Science Your Vacation
Data Science Your VacationData Science Your Vacation
Data Science Your Vacation
 
Data Science Your Vacation
Data Science Your VacationData Science Your Vacation
Data Science Your Vacation
 
Build Your Own Instagram Filters
Build Your Own Instagram FiltersBuild Your Own Instagram Filters
Build Your Own Instagram Filters
 
Choosing a Programming Language
Choosing a Programming LanguageChoosing a Programming Language
Choosing a Programming Language
 
Build a Virtual Pet with JavaScript
Build a Virtual Pet with JavaScriptBuild a Virtual Pet with JavaScript
Build a Virtual Pet with JavaScript
 
DC jQuery App
DC jQuery AppDC jQuery App
DC jQuery App
 
Thinkful DC - Building a Virtual Pet with JavaScript
Thinkful DC - Building a Virtual Pet with JavaScriptThinkful DC - Building a Virtual Pet with JavaScript
Thinkful DC - Building a Virtual Pet with JavaScript
 
Thinkful - Intro to Data Science - Washington DC
Thinkful - Intro to Data Science - Washington DCThinkful - Intro to Data Science - Washington DC
Thinkful - Intro to Data Science - Washington DC
 
Build Your Own Website - Thinkful DC
Build Your Own Website - Thinkful DCBuild Your Own Website - Thinkful DC
Build Your Own Website - Thinkful DC
 
Build a Virtual Pet with JavaScript
Build a Virtual Pet with JavaScriptBuild a Virtual Pet with JavaScript
Build a Virtual Pet with JavaScript
 
Thinkful - Frontend Crash Course - Intro to HTML/CSS
Thinkful - Frontend Crash Course - Intro to HTML/CSSThinkful - Frontend Crash Course - Intro to HTML/CSS
Thinkful - Frontend Crash Course - Intro to HTML/CSS
 
Intro to Data Science
Intro to Data ScienceIntro to Data Science
Intro to Data Science
 
Thinkful - Intro to JavaScript
Thinkful - Intro to JavaScriptThinkful - Intro to JavaScript
Thinkful - Intro to JavaScript
 
Thinkful - HTML/CSS Crash Course (May 4 2017)
Thinkful - HTML/CSS Crash Course (May 4 2017)Thinkful - HTML/CSS Crash Course (May 4 2017)
Thinkful - HTML/CSS Crash Course (May 4 2017)
 

Dernier

Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessPixlogix Infotech
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 

Dernier (20)

Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 

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
  • 23. Exercise Solutions http://bit.ly/intro-js-solutions​ bit.ly/ js-intro-dcWiFi: MakeOffices 5Ghz Password: Internet!23 bit.ly/js-intro-dc 23