Tag: js

Basic Algorithm Scripting – Reverse a String

Basic Algorithm Scripting – Reverse a String

Problem Statement (Reverse a string) : Reverse the provided string. You may need to turn the string into an array before you can reverse it. Your result must be a string. Solution : function reverseString(str) { return str.split(”).reverse().join(”); } Explanation : You can’t directly reverse a string, but what you could do, is convert the …

+ Read More

www.000webhost.com