JavaScript Functions, a Pocket Reference

Functions are callable objects in JavaScript. It is very important to note that in JavaScript functions are objects. It might be misleading because when you use the typeof operator on a function, you get function as the output. This is one of the instances where JavaScript lies to you. The output of typeof function () {} should be object because functions are objects in JavaScript. That makes functions very powerful…