JavaScript Arrow functions

Does the Arrow function in JavaScript used only for anonymous functions?

No. We can also have an arrow function like this:

cosnt funcName = () => {
   return "hello world";
}

console.log(funcName());
1 Like