11. VARIABLES
let
Mercury is the
closest planet to
the Sun
var const
❏ Can be
reassigned
❏ block-scoped
❏ Can be
reassigned
❏ function-
scoped
❏ Can’t be
reassigned
❏ block-scoped
❖ Variables are used to store data
❖ To declare a variable we use 3 keywords :-
14. == operator is known as
equality operator whereas ===
operator is known as strict
equality operator
== compares only values of two
operands whereas === also
compares the datatypes
16. LOOPS
Same as while loop but
it executes atleast one
times
do… while
Execute a block of code
specific number of times
for loop
Execute a block of code
as long as condition is
true
while loop
Used to iterate over
objects
for…in
for…of
Used to iterate over
elements of array or
strings etc
19. Applies a function to
each element of the array
to reduc the array to a
single value
Creates a new array by
filtering out elements
from the array based on
the function
Creates a new array by
applying a function to
each of the original
element
MAP vs FILTER vs REDUCE
map filter reduce
21. ❏ Document Object Model
❏ Programming interface
❏ Represents the Web documents
as tree like model
❏ Create, modify and delete
HTML elements
❏ Play with CSS
What is DOM?