JavaScript – Some ways to build functions in JavaScript

There are plenty of ways to make functions in JS. However, the nicest ones are to assign the function to a variable and to call the variable. Why this is the nicest one? Well, probably because I cannot make something similar with VBA and I would love to give a parameter to a variable there. It would look simply amazing 🙂

This is just a small code, with 4 ways of defining functions in JavaScript plus some usage of the Apply and Call in JavaScript.


console

 

Not a lot of code, but Christmas is coming 🙂 🙂 And you may find it in GitHub here.

Tagged with: