Sign in
webkit
/
WebKit
/
36168652e4948b4e847a9c1caf1fabcf1810968f
/
.
/
JSTests
/
microbenchmarks
/
to-number-only-string.js
blob: 105ad3c8d3a2e4955befc65c95d00c73e369709f [
file
] [
log
] [
blame
]
function
test
(
value
)
{
return
+
value
;
}
var
result
=
0
;
for
(
var
i
=
0
;
i
<
1e4
;
++
i
)
result
=
test
(
i
.
toString
());
if
(
result
!==
9999
)
throw
new
Error
(`
bad result $
{
result
}`);