Fundamentals of Javascript 1700455336
Fundamentals of Javascript 1700455336
Critical Fundamentals
01
Introduction
In this tutorial we will explore some Critical Javascript
Fundaments with examples
Table of contents
Execution Context
Hoisting
Function declaration VS Function expression
Lexial Environment
Javascript_Capsules
02
Execution context
Is the environment where code executes.
Execution phase
Javascript_Capsules
03
Creation Phase
Javascript_Capsules
04
Execution Phase
1-executes code line by line
2-assign values to variables
3-invoke functions
Javascript_Capsules
05
Javascript_Capsules
06
Hoisting
Is to assign values before intialize or invoke fn before
declaration
Javascript_Capsules
07
Fn_declaration VS Fn_expression
Function declaration : is usual function
Function expression : is to assign fn to variable
Javascript_Capsules
08
Fn_declaration VS Fn_expression
Try to answer this code by applying what you understood
Javascript_Capsules
09
Lexical Environment
A specification according to ECMAScript all variables and
function declarations are important think it like a
container
Javascript_Capsules
10
In JavaScript a variable or
function is visible to executing
code if it is in the current lexical
or the parent lexical
environment
Javascript_Capsules
11
Block Scope
Represnts any thing within curly braces { } when using let and
cosnt
Javascript_Capsules
12
Type Coercion
is process of converting JavaScript type to another
Types of coercion:
Explicit
Implicit
1-Boolean( )
2-String( )
3-Number( )
Javascript_Capsules
13
Javascript_Capsules
14
Cloning Objects
Three Methods to clone an
object:
1- Object.assign( )
2- {... object}
3- JSON
Javascript_Capsules
15
Quick notes:
JavaScript is a dynamiclly type language as we can
assign different datatypes to same variables
Javascript_Capsules