fix typo in iter_2d.
replace two "for in array" loops with "for of array" loops. the former gives indexes as strings, whereas the latter gives the actual array items.
This commit is contained in:
parent
4ec9d7fb4c
commit
27fe7d64eb
|
@ -19,8 +19,8 @@ export function range (start, end) {
|
|||
}
|
||||
|
||||
export function iter_2d (range_1d, callback) {
|
||||
for (const y in range_1d) {
|
||||
for (const x in range_1d) {
|
||||
for (const y of range_1d) {
|
||||
for (const x of range_1d) {
|
||||
callback(x, y);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue