Stats: 3,183,301 members, 7,920,114 topics. Date: Tuesday, 13 August 2024 at 07:41 PM |
Nairaland Forum / Science/Technology / Programming / Someone Explain This Javascript Snippet (976 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)
What Are The Main Pros And Cons Of Online Marketplace Platform / Funniest App Reviews In 2019 - Nigerians Why? / Where can i learn programming in a professional way
(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. 5 |