repo.or.cz
/
qtwebkit.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
history
|
raw
|
HEAD
Update ReadMe.md
[qtwebkit.git]
/
JSTests
/
microbenchmarks
/
string-char-code-at.js
blob
c0227fcc9264ac6f09ef705fd3190cce4f13e516
1
function foo(s) {
2
var result = 0;
3
for (var i = 0; i < s.length; ++i)
4
result += s.charCodeAt(i);
5
return result;
6
}
7
8
for (var i = 0; i < 1000000; ++i) {
9
var result = foo("hello");
10
if (result != 532)
11
throw "Error: bad result: " + result;
12
}