michael@0: function test1() { michael@0: function getchar(s, i) { michael@0: return s[i]; michael@0: } michael@0: for (var i=0; i<70; i++) { michael@0: assertEq(getchar("foo", 0), "f"); michael@0: assertEq(getchar("bar", 2), "r"); michael@0: } michael@0: assertEq(getchar("foo", 3), undefined); michael@0: } michael@0: test1();