JSβΊFunctions
ΖFunctionsbeginnerFreeJS
functionarrow functionargumentsdefault paramsrest paramsFunction.length
0/8 done~64 min
1
Mental model: Functions
Mental
~5 min
2
The 11 function exceptions
Exceptions
~14 min
3
Predict the output
Predict
~12 min
4
True or false?
T/F
~4 min
5
Fill in the blanks
Fill
~3 min
6
Fix the bugs
Fix Bug
~7 min
7
Spot the bug
Spot Bug
~4 min
8
Put it together
Cement
~15 min
1 / 8Read~5 min
Mental model: Functions
Build the right picture in your head before we practice.
Arrow functions are not just shorter syntax β they are lexically bound: no own this, no arguments object, cannot be used as constructors, and cannot have their this changed by call/apply/bind.
Regular functions are dynamically bound β this is set at call time. Arrow functions close over the this of their surrounding lexical scope and never change. The arguments object is only available in regular functions (not arrows). Default parameters don't appear in arguments β arguments only reflects what was actually passed.
Scroll to the bottom to continue
Notes
π
Loadingβ¦
Sections
0/8 done~64 min
1
Mental model: Functions
Mental
~5 min
2
The 11 function exceptions
Exceptions
~14 min
3
Predict the output
Predict
~12 min
4
True or false?
T/F
~4 min
5
Fill in the blanks
Fill
~3 min
6
Fix the bugs
Fix Bug
~7 min
7
Spot the bug
Spot Bug
~4 min
8
Put it together
Cement
~15 min
Notes
Notes
π
Loadingβ¦