
org.sonar.l10n.javascript.rules.javascript.NamedFunctionExpression.html Maven / Gradle / Ivy
While named function expressions might be useful for debugging purposes, some browsers do not support them correctly (for example Internet Explorer 8).
Noncompliant Code Example
f = function fun(){}; // Non-Compliant; named function expression
Compliant Solution
fun = function(){}; // Compliant; function expression
Exceptions
ECMAScript 6 generator functions are excluded from this rule.
function* f() {} // Compliant; generator function.
© 2015 - 2025 Weber Informatics LLC | Privacy Policy