Doing an operation on a string without using the result of the operation is useless and is certainly due to a misunderstanding.
var str = "..." str.toUpperCase(); // Noncompliant
var str = "..." str = str.toUpperCase();
This rule is deprecated; use {rule:javascript:S2201} instead.