source: webkit/trunk/JavaScriptCore/kjs/test.js@ 4363

Last change on this file since 4363 was 6, checked in by kocienda, 24 years ago

Imported sources from kde-2.2 distribution

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 464 bytes
Line 
1var i = 0;
2
3function sum(a, b)
4{
5 debug("inside test()");
6 i = i + 1;
7 debug(a);
8 debug(b);
9 return a + b;
10}
11
12s = sum(10, sum(20, 30));
13debug("s = " + s);
14debug("i = " + i);
15
16var a = new Array(11, 22, 33, 44);
17a.length = 2;
18a[4] = 'apple';
19
20for(i = 0; i != a.length; i++)
21 debug("a[" + i + "] = " + a[i]);
22
23var b = new Boolean(1==1);
24b.toString=Object.prototype.toString;
25debug("b = " + b.toString());
26
27// regular expression
28rx = /b*c/;
29debug(rx.exec("abbbcd"));
Note: See TracBrowser for help on using the repository browser.