Doing an operation on a string without using the result of the operation is useless and is certainly due to a misunderstanding.
Noncompliant code example
var str = "..."
str.toUpperCase(); // Noncompliant
Compliant solution
var str = "..."
str = str.toUpperCase();