JavaScript
for
Beginners
@andrerferrer
Let's talk about
JavaScript
NOT JAVA!
SEAHORSE != HORSE
You can find the slides at
bit.ly/JS-for-beginners
In-browser
language
(since 1995)
Le wagon   javascript for beginners - ARF
Le wagon   javascript for beginners - ARF
Workshop Outline
Theoretical intros
Basic concepts to understand
Live-code demos
We code, you don’t :)
Your turn
Take your time & have fun
Data types
typeof
Numbers
-100
0
1
3.14
42
Boolean
true
false
Strings
"John"
"JohnLennon"
"a"
""
null
undefined
Le wagon   javascript for beginners - ARF
Variables
var
var firstName;
var firstName = "John";
"John"
console.log(firstName);
"John"
Conditions
if,else
if (weather ==="rainy") {
console.log("Take an umbrella");
}
if (weather === "rainy") {
console.log("Take an umbrella");
} else {
console.log("Take yoursunglasses");
}
if (weather ==="rainy") {
console.log("Take an umbrella");
} else if (weather ==="stormy"){
console.log("Stay at home");
} else{
console.log("Take yoursunglasses");
}
Boolean
algebra
&&,||,!
var result= a && b;
Logical
and
a b result
false false false
false true false
true false false
true true true
var rain = true;
var wind = true;
if (rain && wind) {
console.log("Really stay at home");
}
var result= a || b;
Logical
or
a b result
false false false
false true true
true false true
true true true
var day = "Saturday";
if (day === "Saturday" || day === "Sunday") {
console.log("It's the week-end!");
}
var result= !a;
Logical not
a result
true false
false true
var sunny= true;
if (!sunny) {
console.log("Cancel the beach");
}
var weather = "raining";
if (weather !== "sunny") {
console.log("Cancel the beach");
}
Loops
forEach,
while
Array
var students = [ "john", "paul", "ringo" ];
students.length // => 3
students[0] // => "john"
students[2] // => "ringo"
students[1] // => "paul"
#forEach
var heroes = ["Thor", "Hulk", "Captain
America", "Iron Man"];
heroes.forEach( (hero) => {
console.log(hero)
});
While
var i = 0;
while (i < heroes.length) {
console.log(heroes[i]);
i = i + 1;
}
Functions
function
function name(parameters) {
body
(return statement)
}
Old way
const name = (parameters) => {
body
(return statement)
}
New way
function fullName(first, last) {
var name = first + " " + last;
return name;
}
Example: Full
Name
fullName("John", "Lennon");
Calling a
function
Function
name
argument
s
Time to Code!
Strings and Numbers
● bit.ly/01-Age-next-year
● bit.ly/02-Full-name
● bit.ly/03-Palindromes
Arrays
● bit.ly/04-Merge-and-sort
● bit.ly/05-Word-counter
● bit.ly/06-Playlist-array
Conditionals
● bit.ly/07-Odd-or-even
● bit.ly/08-Can-you-vote
● bit.ly/09-Find-max
Want to learn more?
Le wagon   javascript for beginners - ARF
Le wagon   javascript for beginners - ARF
Join us!
Thank you!
Feel free to contact us!
milene@lewagon.org
● bit.ly/applyLWRJ

More Related Content

PDF
Ensamblador emu 8086
PDF
Instalación de emu8086 y compilados
PDF
OSDcLang On Mobile Devices
PPT
Linux: Beyond ls and cd
PPTX
Meetup Javascript for beginner
PDF
Le wagon - JavaScript for beginners
PDF
Javascript 101 - Javascript para Iniciantes
PDF
Le Wagon - Javascript for Beginners
Ensamblador emu 8086
Instalación de emu8086 y compilados
OSDcLang On Mobile Devices
Linux: Beyond ls and cd
Meetup Javascript for beginner
Le wagon - JavaScript for beginners
Javascript 101 - Javascript para Iniciantes
Le Wagon - Javascript for Beginners

Similar to Le wagon javascript for beginners - ARF (20)

PPTX
Introduction to JavaScript
PDF
An Introduction to JavaScript: Week One
PDF
Java script basics for beginners
PDF
Fundamental JavaScript [UTC, March 2014]
PDF
Javascript essentials
PDF
Conditonals.pdf
PPS
CS101- Introduction to Computing- Lecture 23
PPTX
Unit - 4 all script are here Javascript.pptx
PDF
JavaScript for beginners
PPTX
What JS? Itself
PPTX
03. Week 03.pptx
PDF
Fewd week5 slides
PPTX
JavaScript Operators
PDF
Le Wagon Australia Workshop
PPTX
datatypes-and-operators in wed development.pptx
PPTX
Introduction to java script
PPT
Javascript
PPTX
Chapter 1 .pptx
PPT
An introduction to javascript
PPTX
JAVASCRIPT - LinkedIn
Introduction to JavaScript
An Introduction to JavaScript: Week One
Java script basics for beginners
Fundamental JavaScript [UTC, March 2014]
Javascript essentials
Conditonals.pdf
CS101- Introduction to Computing- Lecture 23
Unit - 4 all script are here Javascript.pptx
JavaScript for beginners
What JS? Itself
03. Week 03.pptx
Fewd week5 slides
JavaScript Operators
Le Wagon Australia Workshop
datatypes-and-operators in wed development.pptx
Introduction to java script
Javascript
Chapter 1 .pptx
An introduction to javascript
JAVASCRIPT - LinkedIn

Recently uploaded (20)

PDF
Identification of potential depression in social media posts
PDF
IT-ITes Industry bjjbnkmkhkhknbmhkhmjhjkhj
PDF
Introduction to MCP and A2A Protocols: Enabling Agent Communication
PDF
The-Future-of-Automotive-Quality-is-Here-AI-Driven-Engineering.pdf
PDF
Early detection and classification of bone marrow changes in lumbar vertebrae...
PDF
Lung cancer patients survival prediction using outlier detection and optimize...
PDF
Build Real-Time ML Apps with Python, Feast & NoSQL
PPTX
How to use fields_get method in Odoo 18
PPTX
Presentation - Principles of Instructional Design.pptx
PPTX
Blending method and technology for hydrogen.pptx
PDF
Transform-Quality-Engineering-with-AI-A-60-Day-Blueprint-for-Digital-Success.pdf
PDF
Co-training pseudo-labeling for text classification with support vector machi...
PDF
Streamline Vulnerability Management From Minimal Images to SBOMs
PDF
AI.gov: A Trojan Horse in the Age of Artificial Intelligence
PDF
Transform-Your-Supply-Chain-with-AI-Driven-Quality-Engineering.pdf
PPTX
Report in SIP_Distance_Learning_Technology_Impact.pptx
PDF
The-2025-Engineering-Revolution-AI-Quality-and-DevOps-Convergence.pdf
PDF
Advancing precision in air quality forecasting through machine learning integ...
PDF
CEH Module 2 Footprinting CEH V13, concepts
PDF
ment.tech-Siri Delay Opens AI Startup Opportunity in 2025.pdf
Identification of potential depression in social media posts
IT-ITes Industry bjjbnkmkhkhknbmhkhmjhjkhj
Introduction to MCP and A2A Protocols: Enabling Agent Communication
The-Future-of-Automotive-Quality-is-Here-AI-Driven-Engineering.pdf
Early detection and classification of bone marrow changes in lumbar vertebrae...
Lung cancer patients survival prediction using outlier detection and optimize...
Build Real-Time ML Apps with Python, Feast & NoSQL
How to use fields_get method in Odoo 18
Presentation - Principles of Instructional Design.pptx
Blending method and technology for hydrogen.pptx
Transform-Quality-Engineering-with-AI-A-60-Day-Blueprint-for-Digital-Success.pdf
Co-training pseudo-labeling for text classification with support vector machi...
Streamline Vulnerability Management From Minimal Images to SBOMs
AI.gov: A Trojan Horse in the Age of Artificial Intelligence
Transform-Your-Supply-Chain-with-AI-Driven-Quality-Engineering.pdf
Report in SIP_Distance_Learning_Technology_Impact.pptx
The-2025-Engineering-Revolution-AI-Quality-and-DevOps-Convergence.pdf
Advancing precision in air quality forecasting through machine learning integ...
CEH Module 2 Footprinting CEH V13, concepts
ment.tech-Siri Delay Opens AI Startup Opportunity in 2025.pdf

Le wagon javascript for beginners - ARF