All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.sonar.l10n.javascript.rules.javascript.S3757.html Maven / Gradle / Ivy

There is a newer version: 10.17.0.28100
Show newest version

Why is this an issue?

The result of an expression with an arithmetic operator /, *, %, ++, --, -, +=, -=, *=, /=, %=, + or unary operator +, - when at least one operand is Object or Undefined will be always a NaN (Not a Number).

Noncompliant code example

x = [1, 2];
var y = x / 4;  //Noncompliant

Exceptions

  • Date operands: they are implicitly converted to numbers.
  • The binary + operator with Object operand (concatenation).




© 2015 - 2024 Weber Informatics LLC | Privacy Policy