Javscript Functions
2021-8-25 Less than 1 minute
# Javscript Functions
# What are the three ways to syntactically write a function? What are the differences in how the function acts (if any)?
The three ways to syntactically wire a function are Function Declaration, Function Expressions, and Arrow Function Expressions. A Function Declaration is used to define a named function, a Function Expression is used to define a named OR anonymous function, and an Arrow Function Expression is a shorter syntax to write the function.
# What is the difference between Parameters and Arguments?
Parameters are the names created when defining a function. Arguments are the values that the functions receives from the parameters when the function is invoked.
# What are higher order functions? Can you provide an example?
A higher-order function is a function that accepts another function as a parameter, or returns a function. Array.prototype.filter is a higher-order function.
# Daily Challenge
Here is the daily challenge for day 7. JS Loops and Arrays (opens new window)