Javascript Reverse String Method 1
Reverse String Method 1
DIRECTIONS
Given a string,
return a new string with the reversed order of characters
Examples
reverse of apple is elppa
Logic:
Turn string into an array
Call 'reverse' method on the array
Join the array back into a string
Return the result
Coding
function reverse(str) {
return str.split('').reverse().join('');
}
On this page of the site you can watch the video online Javascript Reverse String Method 1 with a duration of hours minute second in good quality, which was uploaded by the user Web Development 11 September 2020, share the link with friends and acquaintances, this video has already been watched 7 times on youtube and it was liked by 0 viewers. Enjoy your viewing!