rm push/pop

This commit is contained in:
2026-02-26 08:13:18 -06:00
parent eb19b18594
commit a1b41d5ecf
59 changed files with 19546 additions and 19265 deletions

View File

@@ -2918,7 +2918,7 @@ return {
test_arrfor_with_index: function() {
var arr = ["a", "b", "c"]
var indices = []
arrfor(arr, (x, i) => { push(indices, i) })
arrfor(arr, (x, i) => { indices[] = i })
if (indices[0] != 0 || indices[2] != 2) return "arrfor with index failed"
},
@@ -2931,7 +2931,7 @@ return {
test_arrfor_mutation: function() {
var arr = [1, 2, 3]
var results = []
arrfor(arr, x => { push(results, x * 2) })
arrfor(arr, x => { results[] = x * 2 })
if (results[0] != 2 || results[1] != 4 || results[2] != 6) return "arrfor mutation failed"
},