Skip to content
Advertisement

Tag: javascript-objects

Javascript ‘for of’ loop not properly resolving to the value

I have a simple array that I’m trying to iterate over but I’m apparently not understanding the ‘for of’ JavaScript loop. The following code returns exactly has it should; return: KD0NBHOBJ W0DLKOBJ WA0TJTOBJ But the following code errors out with; “TypeError: i.getCenter is not a function. (In ‘i.getCenter()’, ‘i.getCenter’ is undefined)” because the variable ‘i’ does not resolve to one

Advertisement