#344 Reverse String
2017-04-27 本文已影响0人
乐正君Krizma
题目:
Write a function that takes a string as input and returns the string reversed.
代码:
/**
* @param {string} s
* @return {string}
*/
var reverseString = function(s) {
return s.split("").reverse().join("");
};