The function we used here in the above example is an anonymous function.
In actual fact, the function in the example is not anonymous. The act of assigning it to a variable or constant on creation results in it taking that as it's name. Try displaying a.name after the assignment - the function has the name 'a'.
In actual fact, the function in the example is not anonymous. The act of assigning it to a variable or constant on creation results in it taking that as it's name. Try displaying
a.name
after the assignment - the function has the name 'a'.Thanks :)