23 lines
349 B
Plaintext
23 lines
349 B
Plaintext
include::../description.adoc[]
|
|
|
|
== Noncompliant Code Example
|
|
|
|
----
|
|
function getLength(a, b, c) {
|
|
const strings = []; // Noncompliant
|
|
strings.push(a);
|
|
strings.push(b);
|
|
strings.push(c);
|
|
|
|
return a.length + b.length + c.length;
|
|
}
|
|
----
|
|
|
|
== Compliant Solution
|
|
|
|
----
|
|
function getLength(a, b, c) {
|
|
return a.length + b.length + c.length;
|
|
}
|
|
----
|