I think it's worth pointing out that a lambda is not simply a shorthand for function declaration. IsAmy is a function. The other two variants are both lambdas and they differ from functions in that they capture all the locals and globals that are visible in the scope where the lambda is defined. IsAmy has no access to those.
Often drawn to the latest new "thing" but generally try to avoid chasing too many silver bullets.
ASP.NET/React developer by day, blogger and ebook/course builder by night.
I think it's worth pointing out that a lambda is not simply a shorthand for function declaration.
IsAmy
is a function. The other two variants are both lambdas and they differ from functions in that they capture all the locals and globals that are visible in the scope where the lambda is defined.IsAmy
has no access to those.Thanks for this, an important clarification and I appreciate you taking the time to outline it here :-)