Anonymous Functions

Learn what are Anonymous functions and why are they used.

We'll cover the following...

Declaration is not the only way to create functions in JavaScript. Check out this example.

Press + to interact
const hello = function(name) {
const message = `Hello, ${name}!`;
return message;
};
console.log(hello("Richard")); // "Hello, Richard!"

In this example, the function is assigned to the hello variable. The value of this variable is a function. We call the ...

Access this course and 1400+ top-rated courses and projects.