The analyzer has detected a potential error when a variable is assigned to itself.
The example:
change(width, height, length) {
this.width = width;
this.height = height;
length = length;
}
In this method, the fields should receive values from the method parameters with matching names. However, a typo causes an error: instead of modifying the length field, a parameter with the same name is assigned to itself.
The fixed code:
change(width, height, length) {
this.width = width;
this.height = height;
this.length = length;
}
Was this page helpful?
Your message has been sent. We will email you at
If you do not see the email in your inbox, please check if it is filtered to one of the following folders: