Details
-
Type:
New Feature
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: JAVASCRIPT-1.2
-
Component/s: JavaScript
-
Labels:None
-
Number of attachments :
Description
Title
Avoid usage of the same name for the declarations of both a function and a variable
Severity
Major
Description
Declaring both a variable and a function with an identical name in same scope should be avoided. Indeed, it makes it ambiguous to whether the named variable refers to the function or to something else, and can even be error prone.
For instance:
var fun;
function fun() {
}
should be refactored into:
var fun = function fun() {
}
Message
Refactor the code to avoid using '
{0}' for both a variable and a function.
Activated?
Yes
Cardinality
Single
Manually tested.