We can define a function in JavaScript without giving it a name. The name of this unnamed function is anonymous function. A variable must be given the anonymous function.