DEV Community

Cover image for Anonymous functions
mohammed sherif
mohammed sherif

Posted on

Anonymous functions

All the functions have a Name , such
as main, hello.
But not every function needs a name. If you remove the
return type and the function name, then what you have left
is an _ anonymous function _.

Function myFunction = int multiply(int a, int b)
{return a * b; };

Top comments (0)