js anonymous functions

JavaScript
// There are several definitions

// Non-anonymous, you name it
function hello() { /* code */ }
// Call as usual
hello()

// The myriad of anonymous functions

// This is actually anonymous
// It is simply stored in a variable
var hello = function() { /* code */ }
// It is called the same way
hello()

// You will usually find them as callbacks
setTimeout(function(){ /* code */ }, 1000)
// jQuery
$('.some-element').each(function(index){ /* code */ })

// Or a self firing-closue
(function(){ /* code */ })()//Anonymous function; It's not assigned to an indentifier

Array.forEach((arguments) => {
	//This is an anonymous function
})

function forEach(arguments) {
	//This is NOT an anonymous function
}
// ES5
var multiplyES5 = function(x, y) {
  return x * y;
};

// ES6
const multiplyES6 = (x, y) => { return x * y };
Source

Also in JavaScript: