I just realised like 4 different ways of writting functions?
Whats the difference between:
var funcStyleOne = function(){};
or
var functionStyleTwo = function newStyle(){};
or
function(){}
or
var ObjectFunc = new Function();
or
function Hello(){}
They are all types of functions but i can’t seem to understand the difference between them. They all kinda do the same thing? Are they just different styles and me as the programmer simply choose whichever style fits my choosing? Or is there a requirement when using one over the other. I know to avoid the one with the “new” since it requires more memory. How about the simple “function hello(){}”? Should i choose that one since it resembles what i use form other languages (C/C++)?