|
|
|
|
|
by ch
5127 days ago
|
|
Still, the blocky code reads "count with i from 0 to (get n)", but the loop generated is accessing A[0-1]..A[n-1]. JavaScript is forgiving here, but A[0..n] is not the same as A[-1..(n-1)] (at least I'm not familiar enough with JavaScript to think otherwise). |
|
As an aside, Lua also uses 1-based indexing.