v1
9/23/2020 by marcelo -10
Setup HTML - click to add setup HTML
disable setup JavaScript
Setup JavaScript
var stringToReverse = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890';
function reverseString1 (str) {
  return str.split('').reverse().join('')
}

function reverseString2(str) {
  let reversed = '';
  for (const character of str) {
    reversed = character + reversed
  }
  return reversed
}

function reverseString3(str) {
  return str.split('').reduce((reversed, character) => character + reversed, '')
}

function reverseString4(str) {
  return [...str].reverse().join('')
}
delete caserun single casemove downdrag and drop case


ready



reverseString1(stringToReverse)
delete caserun single casemove upmove downdrag and drop case


ready



reverseString2(stringToReverse)
delete caserun single casemove upmove downdrag and drop case


ready



reverseString3(stringToReverse)
delete caserun single casemove updrag and drop case


ready



reverseString4(stringToReverse)
Test Case - click to add another test case
Teardown JS - click to add teardown JavaScript
Output (DOM) - click to monitor output (DOM) while test is running
RUN