Functions are Values
Functions are values in JavaScript. Just like 5 is a value that you can assign to a variable, the function that returns its input plus one is a value that you can assign to the variable addOne.
Because functions are values, you can do lots of cool things with them. You can put them in a list.
Because functions are values, you can pass functions as arguments and return them from other functions. Here is a definition of callTwice that takes a function f as an argument and invokes it twice in a row.
Define a function named applyTest that takes two arguments, a function f and an input x. Your function should return a list that contains x, the function f on the input x, and the function f on the input 0.
1:1



