KEMBAR78
Introjs1.9.18tf
Intro to JavaScript: Fundamentals
January 2018
http://bit.ly/introjs-sd
Wifi: Deskhub-main PW: stake2017!
1
Instructor
Tanner Gill
Software Developer - Shapa
Thinkful Graduate
TAs
bit.ly/introjs-sd
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.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 specific files
Browser receives those files 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 files
Application LogicApplication Logic
Initial requestInitial request
Following responseFollowing 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 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/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 first-time
developers
bit.ly/introjs-sd
11
Defining a variable with Javascript
var 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() {
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) {
return a + b;
}
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 & first 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/web-dev-freebit.ly/web-dev-free
Thinkful Coding Prep Course
25

Introjs1.9.18tf

  • 1.
    Intro to JavaScript:Fundamentals January 2018 http://bit.ly/introjs-sd Wifi: Deskhub-main PW: stake2017! 1
  • 2.
    Instructor Tanner Gill Software Developer- Shapa Thinkful Graduate TAs bit.ly/introjs-sd 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.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 specific files Browser receives those files 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 files Application LogicApplication Logic Initial requestInitial request Following responseFollowing 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 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/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 first-time developers bit.ly/introjs-sd 11
  • 12.
    Defining a variablewith Javascript var numberOfSheep = 20 Initialize variable Name of variable Value of variable bit.ly/introjs-sd 12
  • 13.
  • 14.
    Declaring a functionwith Javascript function greet() { 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 == (equalto) 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) { return a + b; } 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 &first 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/web-dev-freebit.ly/web-dev-free Thinkful Coding Prep Course 25