Return
When a function is called the computer runs through all the tasks given inside a code block and executes them
By default the resulting value is
undefined
So to capture that value we use
return
keyword which basically gives the value whenever a function is called
Example:
Instead:
or
Last updated