Professional Documents
Culture Documents
STACK WEB
DEVELOPMENT
V2.2
www.inovotekacademy.com i-novotek academy inovotekacademy
Welcome to
Javascript
www.inovotekacademy.com i-novotek academy +233596038326/+8613051806737 inovotekacademy
The Basics of Javascript
What is
Javascript
www.inovotekacademy.com i-novotek academy +233596038326/+8613051806737 inovotekacademy
The Basics of Javascript
Noun
Noun
Noun Adjective
Noun Adjective
Noun Adjective
How Does
Javascript
Work?
www.inovotekacademy.com i-novotek academy +233596038326/+8613051806737 inovotekacademy
The Basics of Javascript
3
2
person.age = 25 person.shout()
person[age] = 25 person.run()
ECMA
1997
2007
2015
ES6 (ECMAScript 5) Biggest update
2015
ES6 (ECMAScript 5) Biggest update
2016
2015
ES6 (ECMAScript 5) Biggest update
2016
2017
www.inovotekacademy.com i-novotek academy inovotekacademy
Javascript versions
ES6/2015
DESTRUCTURING ES6/2015
ES6/2015
ES6/2015
() =>{}
www.inovotekacademy.com i-novotek academy inovotekacademy
ARROW FUNCTION
ES6/2015
An arrow function expression is a more concise way to
write a traditional function expression, but it cannot be
used in all situations.
Synthax
ES6/2015
ES6/2015
ES6/2015
Arrow functions do not have this keyword.
ES6/2015
Arrow functions do not have this keyword.
ES6/2015
Arrow functions do not have this keyword.
ES6/2015
The spread operator (...) is a
convenient way to copy all or part of
an existing array or object into
another array or object.
Spread vs Rest
Spread syntax "expands" an array into its elements,
while rest syntax collects multiple elements and
"condenses" them into a single element
Block scope
inovotekacademy
www.inovotekacademy.com i-novotek academy
HISTORY OF JAVASCRIPT
Brendan Eich
inovotekacademy
www.inovotekacademy.com i-novotek academy
HISTORY OF JAVASCRIPT
Brendan Eich
inovotekacademy
www.inovotekacademy.com i-novotek academy
HISTORY OF JAVASCRIPT
Brendan Eich
inovotekacademy
www.inovotekacademy.com i-novotek academy
HISTORY OF JAVASCRIPT
Brendan Eich
inovotekacademy
www.inovotekacademy.com i-novotek academy
HISTORY OF JAVASCRIPT
In the early 2000s, Ajax were developed that use JavaScript to create dynamic applications
Brendan Eich
inovotekacademy
www.inovotekacademy.com i-novotek academy
HISTORY OF JAVASCRIPT
In the early 2000s, Ajax were developed that use JavaScript to create dynamic applications
Brendan Eich
inovotekacademy
www.inovotekacademy.com i-novotek academy
HISTORY OF JAVASCRIPT
In the early 2000s, Ajax were developed that use JavaScript to create dynamic applications
Brendan Eich
inovotekacademy
www.inovotekacademy.com i-novotek academy
HISTORY OF JAVASCRIPT
In the early 2000s, Ajax were developed that use JavaScript to create dynamic applications
JavaScript is named after Java, and many of its concepts are borrowed from the Java language
Brendan Eich
inovotekacademy
www.inovotekacademy.com i-novotek academy
HISTORY OF JAVASCRIPT
In the early 2000s, Ajax were developed that use JavaScript to create dynamic applications
JavaScript is named after Java, and many of its concepts are borrowed from the Java language
Brendan Eich
inovotekacademy
www.inovotekacademy.com i-novotek academy
console.log()
inovotekacademy
www.inovotekacademy.com i-novotek academy
console.log()
The console.log() is a function in JavaScript which is used to print any kind of variables
inovotekacademy
www.inovotekacademy.com i-novotek academy
console.log()
The console.log() is a function in JavaScript which is used to print any kind of variables
inovotekacademy
www.inovotekacademy.com i-novotek academy
console.log()
The console.log() is a function in JavaScript which is used to print any kind of variables
inovotekacademy
www.inovotekacademy.com i-novotek academy
console.log()
The console.log() is a function in JavaScript which is used to print any kind of variables
read-eval-print loop (REPL). This refers to the loop that the console runs
inovotekacademy
www.inovotekacademy.com i-novotek academy
Features of javascript
inovotekacademy
www.inovotekacademy.com i-novotek academy
Features of javascript
It's a single threaded language
inovotekacademy
www.inovotekacademy.com i-novotek academy
Features of javascript
It's a single threaded language
inovotekacademy
www.inovotekacademy.com i-novotek academy
Features of javascript
It's a single threaded language
object-oriented language
inovotekacademy
www.inovotekacademy.com i-novotek academy
Features of javascript
It's a single threaded language
object-oriented language
inovotekacademy
www.inovotekacademy.com i-novotek academy
Features of javascript
It's a single threaded language
object-oriented language
inovotekacademy
www.inovotekacademy.com i-novotek academy
Features of javascript
It's a single threaded language
object-oriented language
inovotekacademy
www.inovotekacademy.com i-novotek academy
Features of javascript
It's a single threaded language
object-oriented language
It's a non-blocking
inovotekacademy
www.inovotekacademy.com i-novotek academy
Features of javascript
It's a single threaded language
object-oriented language
It's a non-blocking
inovotekacademy
www.inovotekacademy.com i-novotek academy
Features of javascript
It's a single threaded language This means that js executes the code line
It's a dynamically typed language
by line.
object-oriented language
It's a non-blocking
inovotekacademy
www.inovotekacademy.com i-novotek academy
Features of javascript
It's a single threaded language
It's a non-blocking
inovotekacademy
www.inovotekacademy.com i-novotek academy
Features of javascript
It's a single threaded language
It's a non-blocking
inovotekacademy
www.inovotekacademy.com i-novotek academy
Features of javascript
It's a single threaded language
It's a non-blocking
inovotekacademy
www.inovotekacademy.com i-novotek academy
Features of javascript
It's a single threaded language
object-oriented language
It's a non-blocking
inovotekacademy
www.inovotekacademy.com i-novotek academy
Features of javascript
It's a single threaded language
object-oriented language
It's a non-blocking
inovotekacademy
www.inovotekacademy.com i-novotek academy
Features of javascript
It's a single threaded language
object-oriented language
inovotekacademy
www.inovotekacademy.com i-novotek academy
Features of javascript
High-level language
inovotekacademy
www.inovotekacademy.com i-novotek academy
Features of javascript
High-level language
1. Functional programming
2. Object oriented programming
3. Procedural programming
inovotekacademy
www.inovotekacademy.com i-novotek academy
V8 Engine
inovotekacademy
www.inovotekacademy.com i-novotek academy
V8 Engine
V8 Engine
inovotekacademy
www.inovotekacademy.com i-novotek academy
V8 Engine
V8 Engine
inovotekacademy
www.inovotekacademy.com i-novotek academy
V8 Engine
V8 Engine
inovotekacademy
www.inovotekacademy.com i-novotek academy
V8 Engine
V8 Engine
inovotekacademy
www.inovotekacademy.com i-novotek academy
Code execution process
V8 Engine
inovotekacademy
www.inovotekacademy.com i-novotek academy
Code execution process
source code
V8 Engine
inovotekacademy
www.inovotekacademy.com i-novotek academy
Code execution process
source code
V8 Engine
inovotekacademy
www.inovotekacademy.com i-novotek academy
Code execution process
source code
V8 Engine
inovotekacademy
www.inovotekacademy.com i-novotek academy
Code execution process
source code
V8 Engine
inovotekacademy
www.inovotekacademy.com i-novotek academy
Code execution process
source code
parser
V8 Engine
inovotekacademy
www.inovotekacademy.com i-novotek academy
Code execution process
source code
parser
V8 Engine
inovotekacademy
www.inovotekacademy.com i-novotek academy
Code execution process
source code
parser
machine code
V8 Engine
inovotekacademy
www.inovotekacademy.com i-novotek academy
Code execution process
source code
parser
Compilation
machine code
V8 Engine
inovotekacademy
www.inovotekacademy.com i-novotek academy
Code execution process
source code
parser
Compilation
machine code
V8 Engine
browser
inovotekacademy
www.inovotekacademy.com i-novotek academy
Code execution process
source code
parser
Compilation
machine code
V8 Engine
interpreter
browser
inovotekacademy
www.inovotekacademy.com i-novotek academy
Code execution process
source code
parser
Compilation
machine code
V8 Engine
interpreter
browser
inovotekacademy
www.inovotekacademy.com i-novotek academy
JS Runtime (Browser)
inovotekacademy
www.inovotekacademy.com i-novotek academy
JS Runtime (Browser)
inovotekacademy
www.inovotekacademy.com i-novotek academy
JS Runtime (Browser)
JS Engine
inovotekacademy
www.inovotekacademy.com i-novotek academy
JS Runtime (Browser)
JS Engine
Call Stack
inovotekacademy
www.inovotekacademy.com i-novotek academy
JS Runtime (Browser)
JS Engine
fn1()
Call Stack
inovotekacademy
www.inovotekacademy.com i-novotek academy
JS Runtime (Browser)
JS Engine
fn2()
fn1()
Call Stack
inovotekacademy
www.inovotekacademy.com i-novotek academy
JS Runtime (Browser)
JS Engine
fn3()
fn2()
fn1()
Call Stack
inovotekacademy
www.inovotekacademy.com i-novotek academy
JS Runtime (Browser)
JS Engine
fn3()
fn2()
fn1()
inovotekacademy
www.inovotekacademy.com i-novotek academy
JS Runtime (Browser)
JS Engine
WEB APIs
fn3()
fn2()
fn1()
inovotekacademy
www.inovotekacademy.com i-novotek academy
JS Runtime (Browser)
JS Engine
WEB APIs
DOM
fn3()
fn2()
fn1()
inovotekacademy
www.inovotekacademy.com i-novotek academy
JS Runtime (Browser)
JS Engine
WEB APIs
DOM Timers
fn3()
fn2()
fn1()
inovotekacademy
www.inovotekacademy.com i-novotek academy
JS Runtime (Browser)
JS Engine
WEB APIs
DOM Timers
fn3()
fn2()
fn1() setTimer
inovotekacademy
www.inovotekacademy.com i-novotek academy
JS Runtime (Browser)
JS Engine
WEB APIs
DOM Timers
fn3()
fn2()
fn1() setTimer
inovotekacademy
www.inovotekacademy.com i-novotek academy
JS Runtime (Browser)
JS Engine
WEB APIs
DOM Timers
fn3()
fn2()
fn1() setTimer
Callback Que
Heap Call Stack setInterval
inovotekacademy
www.inovotekacademy.com i-novotek academy
JS Runtime (Browser)
JS Engine
WEB APIs
DOM Timers
fn3()
fn1() setTimer
Callback Que
Heap Call Stack setInterval
inovotekacademy
www.inovotekacademy.com i-novotek academy
JS Runtime (Browser)
JS Engine
WEB APIs
DOM Timers
fn3()
fn1() setTimer
Callback Que
Heap Call Stack setInterval
inovotekacademy
www.inovotekacademy.com i-novotek academy
JS Callstack
Call Stack
fn3()
fn2()
fn1()
inovotekacademy
www.inovotekacademy.com i-novotek academy
Synchronous
VS
Asynchronous
programming
inovotekacademy
www.inovotekacademy.com i-novotek academy
Synchronous vs Asynchronous
inovotekacademy
www.inovotekacademy.com i-novotek academy
Synchronous Asynchronous
inovotekacademy
www.inovotekacademy.com i-novotek academy
Synchronous
programming
Single threaded
inovotekacademy
www.inovotekacademy.com i-novotek academy
Synchronous programming
inovotekacademy
www.inovotekacademy.com i-novotek academy
Synchronous programming
inovotekacademy
www.inovotekacademy.com i-novotek academy
Synchronous programming
inovotekacademy
www.inovotekacademy.com i-novotek academy
Synchronous programming
inovotekacademy
www.inovotekacademy.com i-novotek academy
Synchronous programming
inovotekacademy
www.inovotekacademy.com i-novotek academy
Synchronous programming
inovotekacademy
www.inovotekacademy.com i-novotek academy
Synchronous programming
inovotekacademy
www.inovotekacademy.com i-novotek academy
Synchronous programming
inovotekacademy
www.inovotekacademy.com i-novotek academy
Synchronous programming
inovotekacademy
www.inovotekacademy.com i-novotek academy
Synchronous programming
inovotekacademy
www.inovotekacademy.com i-novotek academy
Synchronous programming
inovotekacademy
www.inovotekacademy.com i-novotek academy
Synchronous programming
50 minutes to cook
inovotekacademy
www.inovotekacademy.com i-novotek academy
Synchronous programming
inovotekacademy
www.inovotekacademy.com i-novotek academy
Synchronous programming
inovotekacademy
www.inovotekacademy.com i-novotek academy
Synchronous programming
inovotekacademy
www.inovotekacademy.com i-novotek academy
Synchronous programming
inovotekacademy
www.inovotekacademy.com i-novotek academy
Synchronous programming
inovotekacademy
www.inovotekacademy.com i-novotek academy
Synchronous programming
inovotekacademy
www.inovotekacademy.com i-novotek academy
Synchronous programming
3 minutes to cook
inovotekacademy
www.inovotekacademy.com i-novotek academy
Synchronous programming
3 minutes to cook
inovotekacademy
www.inovotekacademy.com i-novotek academy
Synchronous programming
inovotekacademy
www.inovotekacademy.com i-novotek academy
Asynchronous
programming
Multi threaded
inovotekacademy
www.inovotekacademy.com i-novotek academy
Asynchronous programming
Multi threaded
50 minutes to cook 10 minutes to cook 3 minutes to cook
inovotekacademy
www.inovotekacademy.com i-novotek academy
Asynchronous programming
Multi threaded
50 minutes to cook 10 minutes to cook 3 minutes to cook
inovotekacademy
www.inovotekacademy.com i-novotek academy
Asynchronous programming
Multi threaded
50 minutes to cook 10 minutes to cook
inovotekacademy
www.inovotekacademy.com i-novotek academy
Asynchronous programming
Multi threaded
50 minutes to cook
inovotekacademy
www.inovotekacademy.com i-novotek academy
Asynchronous programming
Multi threaded
inovotekacademy
www.inovotekacademy.com i-novotek academy
Ways of writing
Async Code
inovotekacademy
www.inovotekacademy.com i-novotek academy
Ways of writing Async Code
SetTimeout
inovotekacademy
www.inovotekacademy.com i-novotek academy
Ways of writing Async Code
SetTimeout Callback
inovotekacademy
www.inovotekacademy.com i-novotek academy
Ways of writing Async Code
inovotekacademy
www.inovotekacademy.com i-novotek academy
Ways of writing Async Code
SetTimeout
inovotekacademy
www.inovotekacademy.com i-novotek academy