Intro to JavaScript: FundamentalsIntro to JavaScript: Fundamentals
May 2018
PDF Slides + Starter code: bit.ly/introjs-sdPDF Slides + Starter code: bit.ly/introjs-sd
 
Interactive Slides: bit.ly/sd-slides-5218
Wi : Deskhub-main   PW: stake2017!
1
Instructor
Amanda Pattridge 
Bootcamp Graduate
Application Developer at TechFlow
TA
bit.ly/introjs-sd
Tanner Gill
Thinkful Graduate
React Native developer
2
About you
What's your name? 
What brought you here today?
What is your programming experience?
bit.ly/introjs-sd
3
About Thinkful
We train developers and data scientists through
1x1 mentorship and project-based learning.
 
Guaranteed.
4
Agenda
Learn key Javascript concepts 
Go over assignments 
Complete assignments with our support! 
Go over answer key 
5
How the web works
Type a URL from a client (e.g. google.com)
Browser sends an HTTP request asking for speci c les
Browser receives those les and renders them as a website
bit.ly/introjs-sd
6
Client/Servers
Client (sends requests)
Frontend Developer
Manages what user sees
Server (sends response)
Backend Developer
Manages what app does
bit.ly/introjs-sd
7
Example: facebook.com
Client Server
Open browser
and navigate to
facebook.com
HTML, CSS, &
Javascrip render
newsfeed
Request
Response
Algorithm
determines
content of feed.
 
Sends back
HTML, CSS,
Javascript les
Application Logic
Initial request
Following response
bit.ly/introjs-sd
8
Example: facebook.com
Client Server
Open browser
and navigate to
facebook.com
HTML, CSS, &
Javascrip render
newsfeed
Request
Response
Algorithm
determines
content of feed.
 
Sends back
HTML, CSS,
Javascript les
Application Logic
Initial request
Following response
We'll be writing Javascript, the code
that the browser uses to run the app
9
bit.ly/introjs-sd
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/introjs-sd
10
Javascript today
Has large community of developers, libraries and
frameworks 
Lots of job opportunities 
Also the syntax is easier to understand for rst-time
developers
bit.ly/introjs-sd
  11
De ning a variable with Javascript
var numberOfSheep = 20var numberOfSheep = 20
Initialize variable
Name of variable
Value of variable
bit.ly/introjs-sd
12
Variable examples
bit.ly/introjs-sd
13
Declaring a function with Javascript
function greet() {function greet() {
   return "Hello world!";   return "Hello world!";
}}
Initialize function Name of function
What the function does
bit.ly/introjs-sd
14
Function examples
bit.ly/tf-intro-js
15
If/Else Statements
go to gas stationkeep driving
if false if true
need gas?
family roadtrip
bit.ly/introjs-sd
16
If/Else Statements
function familyRoadtrip() {
    if (needGas == true) {
        getGas();
    }
    else {
        keepDriving();
    }
}
bit.ly/introjs-sd
17
Comparing Values
==    (equal to)
 
         5 == 5  --> true
         5 == 6  --> false
 
!=     (not equal to)
 
         5 != 5  --> false
         5 != 6  --> true
 
bit.ly/introjs-sd
18
If/Else Statements and Comparing Values
bit.ly/introjs-sd
19
Parameters within functions
function adder(a, b) {function adder(a, b) {
   return a + b;   return a + b;
}}
adder(1,2);adder(1,2);
Parameters in declaration
Parameters used
within the function
bit.ly/introjs-sd
20
Examples of parameters within functions
bit.ly/introjs-sd
  21
Real developers use Google... a lot
bit.ly/introjs-sd
22
Repl.it setup & rst steps!
http://bit.ly/tf-intro-js-challenges
bit.ly/introjs-sd
23
Ways to keep learning
24
Thinkful's free course
HTML, CSS and JavaScript
Unlimited group mentor sessions
Personal Program Manager
Slack Channel
bit.ly/tfsd-wdbit.ly/tfsd-wd
Thinkful Coding Prep Course
25

Deck 8983a1d9-68df-4447-8481-3b4fd0de734c-9-52-74-451

  • 1.
    Intro to JavaScript:FundamentalsIntro to JavaScript: Fundamentals May 2018 PDF Slides + Starter code: bit.ly/introjs-sdPDF Slides + Starter code: bit.ly/introjs-sd   Interactive Slides: bit.ly/sd-slides-5218 Wi : Deskhub-main   PW: stake2017! 1
  • 2.
    Instructor Amanda Pattridge  Bootcamp Graduate ApplicationDeveloper at TechFlow TA bit.ly/introjs-sd Tanner Gill Thinkful Graduate React Native developer 2
  • 3.
    About you What's yourname?  What brought you here today? What is your programming experience? bit.ly/introjs-sd 3
  • 4.
    About Thinkful We traindevelopers and data scientists through 1x1 mentorship and project-based learning.   Guaranteed. 4
  • 5.
    Agenda Learn key Javascriptconcepts  Go over assignments  Complete assignments with our support!  Go over answer key  5
  • 6.
    How the webworks Type a URL from a client (e.g. google.com) Browser sends an HTTP request asking for speci c les Browser receives those les and renders them as a website bit.ly/introjs-sd 6
  • 7.
    Client/Servers Client (sends requests) FrontendDeveloper Manages what user sees Server (sends response) Backend Developer Manages what app does bit.ly/introjs-sd 7
  • 8.
    Example: facebook.com Client Server Openbrowser and navigate to facebook.com HTML, CSS, & Javascrip render newsfeed Request Response Algorithm determines content of feed.   Sends back HTML, CSS, Javascript les Application Logic Initial request Following response bit.ly/introjs-sd 8
  • 9.
    Example: facebook.com Client Server Openbrowser and navigate to facebook.com HTML, CSS, & Javascrip render newsfeed Request Response Algorithm determines content of feed.   Sends back HTML, CSS, Javascript les Application Logic Initial request Following response We'll be writing Javascript, the code that the browser uses to run the app 9 bit.ly/introjs-sd
  • 10.
    History of Javascript  Writtenby 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/introjs-sd 10
  • 11.
    Javascript today Has largecommunity of developers, libraries and frameworks  Lots of job opportunities  Also the syntax is easier to understand for rst-time developers bit.ly/introjs-sd   11
  • 12.
    De ning avariable with Javascript var numberOfSheep = 20var numberOfSheep = 20 Initialize variable Name of variable Value of variable bit.ly/introjs-sd 12
  • 13.
  • 14.
    Declaring a functionwith Javascript function greet() {function greet() {    return "Hello world!";   return "Hello world!"; }} Initialize function Name of function What the function does bit.ly/introjs-sd 14
  • 15.
  • 16.
    If/Else Statements go togas stationkeep driving if false if true need gas? family roadtrip bit.ly/introjs-sd 16
  • 17.
    If/Else Statements function familyRoadtrip(){     if (needGas == true) {         getGas();     }     else {         keepDriving();     } } bit.ly/introjs-sd 17
  • 18.
    Comparing Values ==   (equal to)            5 == 5  --> true          5 == 6  --> false   !=     (not equal to)            5 != 5  --> false          5 != 6  --> true   bit.ly/introjs-sd 18
  • 19.
    If/Else Statements andComparing Values bit.ly/introjs-sd 19
  • 20.
    Parameters within functions functionadder(a, b) {function adder(a, b) {    return a + b;   return a + b; }} adder(1,2);adder(1,2); Parameters in declaration Parameters used within the function bit.ly/introjs-sd 20
  • 21.
    Examples of parameterswithin functions bit.ly/introjs-sd   21
  • 22.
    Real developers useGoogle... a lot bit.ly/introjs-sd 22
  • 23.
    Repl.it setup &rst steps! http://bit.ly/tf-intro-js-challenges bit.ly/introjs-sd 23
  • 24.
    Ways to keeplearning 24
  • 25.
    Thinkful's free course HTML,CSS and JavaScript Unlimited group mentor sessions Personal Program Manager Slack Channel bit.ly/tfsd-wdbit.ly/tfsd-wd Thinkful Coding Prep Course 25