This document provides an introduction to JavaScript fundamentals. It discusses key JavaScript concepts like variables, functions, if/else statements, comparing values, and parameters within functions. It also gives an overview of how the web works with clients making requests to servers, and examples of this using Facebook.com. Attendees are encouraged to keep learning JavaScript through repl.it challenges and Thinkful's free web development resources.
3. About you
What's your name?Ā
What brought you here today?
What is your programming experience?
3
4. About Thinkful
We train developers and data scientists through
1x1 mentorship and project-based learning.
Ā
Guaranteed.
4
5. Agenda
Learn key Javascript conceptsĀ
Go over assignmentsĀ
Complete assignments with our support!Ā
Go over answer keyĀ
5
6. 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
6
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 ļ¬les
Application Logic
Initial request
Following response
8
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 ļ¬les
Application Logic
Initial request
Following response
We'll be writing JavaScript, the code
that the browser uses to run the app
9
10. Deļ¬ning a variable with JavaScript
var numberOfSheep = 20var numberOfSheep = 20
Initialize variable
Name of variable
Value of variable
10
12. 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
18. 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
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