javascript reverse string

var strReversed = str.split('').reverse().join('');

function:

function reverse(str){
    return str.split('').reverse().join('');
}

Leave a Reply

Your email address will not be published. Required fields are marked *