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

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

There is a newer version: 10.20.0.29356
Show newest version

If a function does not return anything, it makes no sense to use its output. Specifically, passing it to another function, or assigning its "result" to a variable is probably a bug because such functions return undefined, which is probably not what was intended.

Noncompliant Code Example

function foo() {
  console.log("Hello, World!");
}

a = foo();

Compliant Solution

function foo() {
  console.log("Hello, World!");
}

foo();




© 2015 - 2025 Weber Informatics LLC | Privacy Policy