While watching one of Kyle Simpson workshops about JavaScript, he gave three major negatives for using anonymous function expression in JavaScript as compared to a named function expressions:
1. There is noway inside the function to refers to itself, Say if you want to create recursion. There is noway for the function to refer to itself within itself.
2. They don't play well in debugging, especially in minified code. But if you give it a name, that name will help in the debug trace.
3. give it a name makes it self documented code.
1. There is noway inside the function to refers to itself, Say if you want to create recursion. There is noway for the function to refer to itself within itself.
2. They don't play well in debugging, especially in minified code. But if you give it a name, that name will help in the debug trace.
3. give it a name makes it self documented code.
No comments:
Post a Comment