Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

js trailing commas

const array = [24, 34, 35, 24, , , , 45];

console.log(array);
console.log(array.length)
// Response: [ 24, 34, 35, 24, <3 empty items>, 45 ]
// 8
Source by developer.mozilla.org #
 
PREVIOUS NEXT
Tagged: #js #trailing #commas
ADD COMMENT
Topic
Name
1+1 =