Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / NewStats: 3,195,510 members, 7,958,546 topics. Date: Wednesday, 25 September 2024 at 04:52 PM |
Nairaland Forum / Science/Technology / Programming / Someone Explain This Javascript Snippet (990 Views)
HELP With This Javascript Problem / Can Someone Help Me With With This Javascript Exercise Please / Help Me With This Javascript Problem (2) (3) (4)
(1) (Reply)
Someone Explain This Javascript Snippet by NaHiim: 11:17am On Jan 31, 2018 |
Please house, forgive my ignorance but I've been trying to wrap my head around the bolded code. I need someone to please explain. var bricks = []; for (var c=0 ; c<column ; c++) { bricks[c] = []; for (r=0 ; r<row ; r++) { bricks[c][r] = {x:0, y:0}; } } |
Re: Someone Explain This Javascript Snippet by codemarshal08(m): 11:22am On Jan 31, 2018 |
NaHiim: bricks[c][r] = {x:0, y:0}; => this line is assigning an object literal to the cell in cth column, rth row in the bricks multidimensional arrays 3 Likes |
(1) (Reply)
Looking For Programming Jobs, Find It On Getdev.co! / Can Someone Help Me With With Programing On Android / Streamline Process Of How To Create An App From Scratch
(Go Up)
Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health religion celebs tv-movies music-radio literature webmasters programming techmarket Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10) Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 7 |