Reverse string

Benchmark created on


Test runner

Ready to run.

Testing in
TestOps/sec
For
const word = 'sql injection';
let reversed = '';
for (let i = 0; i < word.length - 1; ++i) {
	reversed = word[i] + reversed;
}
ready
String
"sql injection".split().reverse().join("")
ready
Array
Array.from("sql injection").reverse().join("")
ready

Revisions

You can edit these tests or add more tests to this page by appending /edit to the URL.