Reversed Strings : codewars javascript

front·2022년 11월 9일

kata

Complete the solution so that it reverses the string passed into it.

'world'  =>  'dlrow'
'word'   =>  'drow'

my answer

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

best answer

function solution(str){
  return str.split('').reverse().join('');  
}
profile
그냥 하기

0개의 댓글