Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

javascript llenar array con objetos

let a = new Array(4)
for (let i = 0; i < 4; i++) {
  a[i] = new Array(4)
  for (let j = 0; j < 4; j++) {
    a[i][j] = '[' + i + ', ' + j + ']'
  }
}
Source by developer.mozilla.org #
 
PREVIOUS NEXT
Tagged: #javascript #llenar #array #objetos
ADD COMMENT
Topic
Name
5+5 =