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:
HyperOnion 2023-06-28 14:22:32 +02:00
parent 4ec9d7fb4c
commit 27fe7d64eb
1 changed files with 2 additions and 2 deletions

View File

@ -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);
}
}