38 lines
614 B
Plaintext
38 lines
614 B
Plaintext
== Why is this an issue?
|
|
|
|
include::../description.adoc[]
|
|
|
|
=== Noncompliant code example
|
|
|
|
[source,javascript]
|
|
----
|
|
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
|
|
|
|
[source,javascript]
|
|
----
|
|
function getLength(a, b, c) {
|
|
return a.length + b.length + c.length;
|
|
}
|
|
----
|
|
ifdef::env-github,rspecator-view[]
|
|
|
|
'''
|
|
== Implementation Specification
|
|
(visible only on this page)
|
|
|
|
include::../message.adoc[]
|
|
|
|
include::../highlighting.adoc[]
|
|
|
|
endif::env-github,rspecator-view[]
|