Intro to JavaScript: Fundamentals January 2018 http://bit.ly/tf-intro-js Wi-Fi: Cross Camp.us Events 1
Instructor Cyrus Kia Solutions Engineer & Web Developer TA's Justin Ezor Thinkful LA Community Manager & Web Developer 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 = 20 Initialize variable Name of variable Value of variable 10
Repl.it setup & first steps! bit.ly/tf-intro-js-challenges 11
Variable examples JSBin.com 12
Declaring a function with JavaScript function greet() { return "Hello world!"; } Initialize function Name of function What the function does 13
Function examples JSBin.com 14
If/Else Statements go to gas stationkeep driving if false if true need gas? family roadtrip 15
If/Else Statements function familyRoadtrip() { if (needGas == true) { getGas(); } else { keepDriving(); } } 16
Comparing Values == (equal to) 5 == 5 --> true 5 == 6 --> false != (not equal to) 5 != 5 --> false 5 != 6 --> true 17
If/Else Statements and Comparing Values JSBin.com 18
Parameters within functions function adder(a, b) { return a + b; } adder(1,2); Parameters in declaration Parameters used within the function 19
Examples of parameters within functions JSBin.com 20
Real developers use Google... a lot bit.ly/intro-js-la 21
Ways to keep learning 22
Thinkful's free resource HTML, CSS and JavaScript Unlimited group mentor sessions Personal Program Manager Slack Channel bit.ly/web-dev-free-la Web Development Fundamentals Course 23

LA 1/31/18 Intro to JavaScript: Fundamentals