Intermediate Javascript Notes
Intermediate Javascript Notes
new
of the
constructing function -
this .
4 .
returns this (the
newly constructed object) if there's
no return statement in the function body .
call
apply , ,
bind
·
use these to
explicitly set the value of this in
a
function .
·
use method of one object
a on another
·
call
Function call -> set the this value
manually
fu .
call (param(
↑ pass in object that should
equal new this
, ,
-
param 2)
L these Parameters
get passed to the function
after this is set to new
objects .
apply
·fr obi Fargl argeI)
.
apply , ,
instead of
passing parameters one &
a time