Intro to JavaScript: FUNdamentalsIntro to JavaScript: FUNdamentals March 2018 http://bit.ly/js­fun­lahttp://bit.ly/js­fun­la Wi-Fi: Cross Camp.us Events   1
Instructor Justin Ezor Thinkful LA Community Manager & Web Developer TA's 2
About you What's your name?  What brought you here today? What is your programming experience? 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 specific files Browser receives those files and renders them as a website 6
Client/Servers Client (sends requests) Frontend Developer Manages what user sees Server (sends response) Backend Developer Manages what app does 7
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 Logic Initial request Following response 8
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 Logic Initial request Following response We'll be writing JavaScript, the code that the browser uses to run the app 9
Defining a variable with JavaScript var numberOfSheep = 20var numberOfSheep = 20 Initialize variable Name of variable Value of variable 10
Variable examples JSBin.com 11
Declaring a function with JavaScript function greet() {function greet() {    return "Hello world!";   return "Hello world!"; }} Initialize function Name of function What the function does 12
Function examples JSBin.com 13
If/Else Statements go to gas stationkeep driving if false if true need gas? family roadtrip 14
If/Else Statements function familyRoadtrip() {     if (needGas == true) {         getGas();     }     else {         keepDriving();     } } 15
Comparing Values ==    (equal to)            5 == 5  --> true          5 == 6  --> false   !=     (not equal to)            5 != 5  --> false          5 != 6  --> true   16
If/Else Statements and Comparing Values JSBin.com 17
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 18
Examples of parameters within functions JSBin.com 19
Real developers use Google... a lot bit.ly/intro-js-la 20
Repl.it setup & first steps! bit.ly/tf-intro-js-challenges 21
Ways to keep learning 22
Thinkful's free resource HTML, CSS and JavaScript Unlimited group mentor sessions Personal Program Manager Student Slack Community bit.ly/web-free-labit.ly/web-free-la Web Development Fundamentals Course 23

Intro to JavaScript: FUNdamentals (3/7/18)

  • 1.
    Intro to JavaScript:FUNdamentalsIntro to JavaScript: FUNdamentals March 2018 http://bit.ly/js­fun­lahttp://bit.ly/js­fun­la Wi-Fi: Cross Camp.us Events   1
  • 2.
    Instructor Justin Ezor Thinkful LACommunity Manager & Web Developer TA's 2
  • 3.
    About you What's yourname?  What brought you here today? What is your programming experience? 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 specific files Browser receives those files and renders them as a website 6
  • 7.
    Client/Servers Client (sends requests) FrontendDeveloper Manages what user sees Server (sends response) Backend Developer Manages what app does 7
  • 8.
    Example: facebook.com Client Server Openbrowser and navigate to facebook.com HTML, CSS, & JavaScript render newsfeed Request Response Algorithm determines content of feed.   Sends back HTML, CSS, JavaScript files Application Logic Initial request Following response 8
  • 9.
    Example: facebook.com Client Server Openbrowser and navigate to facebook.com HTML, CSS, & JavaScript render newsfeed Request Response Algorithm determines content of feed.   Sends back HTML, CSS, JavaScript files Application Logic Initial request Following response We'll be writing JavaScript, the code that the browser uses to run the app 9
  • 10.
    Defining a variablewith JavaScript var numberOfSheep = 20var numberOfSheep = 20 Initialize variable Name of variable Value of variable 10
  • 11.
  • 12.
    Declaring a functionwith JavaScript function greet() {function greet() {    return "Hello world!";   return "Hello world!"; }} Initialize function Name of function What the function does 12
  • 13.
  • 14.
    If/Else Statements go togas stationkeep driving if false if true need gas? family roadtrip 14
  • 15.
    If/Else Statements function familyRoadtrip(){     if (needGas == true) {         getGas();     }     else {         keepDriving();     } } 15
  • 16.
    Comparing Values ==   (equal to)            5 == 5  --> true          5 == 6  --> false   !=     (not equal to)            5 != 5  --> false          5 != 6  --> true   16
  • 17.
    If/Else Statements andComparing Values JSBin.com 17
  • 18.
    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 18
  • 19.
    Examples of parameterswithin functions JSBin.com 19
  • 20.
    Real developers useGoogle... a lot bit.ly/intro-js-la 20
  • 21.
    Repl.it setup &first steps! bit.ly/tf-intro-js-challenges 21
  • 22.
    Ways to keeplearning 22
  • 23.
    Thinkful's free resource HTML,CSS and JavaScript Unlimited group mentor sessions Personal Program Manager Student Slack Community bit.ly/web-free-labit.ly/web-free-la Web Development Fundamentals Course 23