test

Benchmark created on


Test runner

Ready to run.

Testing in
TestOps/sec
reduce
function reverseString(text) {
    return text.split("").reduce((acc, char) => char + acc, '')
}
ready
some thing
function reverseString(text) {
    if (text === "") {
        return ""
    } else {
        return reverseString(text.substr(1)) + text[0]
    }
}
ready
more methods
function reverseString(text) {
    return text.split("").reverse().join("")
}
ready
loop
function reverseString(text) {
    let result = ""

    for (let i = text.length - 1; i >= 0; i--) {
        result += text[i]
    }

    return result
}
ready

Revisions

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