Assignment to function name not allowed |
This is strictly not allowed in ECMAScript, however some browsers allow it by accident
CheckId | SPC018910 |
---|---|
TypeName | AssignmentToFunctionNameNotAllowed |
Severity | CriticalError |
Type | JavaScriptFile |
Bad Practice
// Assignment not allowed
myFunc.name = 'newFunc';
myFunc.name = 'newFunc';
Good Practice
// Assignment allowed
var newFunc = myFunc;
var newFunc = myFunc;
Disclaimer: The views and opinions expressed in this documentation and in SPCAF do not necessarily reflect the opinions and recommendations of Microsoft or any member of Microsoft. SPCAF and RENCORE are registered trademarks of Rencore. All other trademarks, service marks, collective marks, copyrights, registered names, and marks used or cited by this documentation are the property of their respective owners.