25 lines
478 B
Plaintext
25 lines
478 B
Plaintext
An array declared with missing ("sparse") elements is likely to be an error: an extra comma was inserted or perhaps the developer meant to insert the missing value and forgot.
|
|
|
|
|
|
== Noncompliant Code Example
|
|
|
|
----
|
|
let a = [1, , 3, 6, 9]; // Noncompliant
|
|
----
|
|
|
|
|
|
== Compliant Solution
|
|
|
|
----
|
|
let a = [1, 3, 6, 9];
|
|
----
|
|
|
|
|
|
ifdef::env-github,rspecator-view[]
|
|
'''
|
|
== Comments And Links
|
|
(visible only on this page)
|
|
|
|
include::comments-and-links.adoc[]
|
|
endif::env-github,rspecator-view[]
|