LeetCode 344. Reverse String

Write a function that takes a string as input and returns the string reversed.

Example:
Given s = "hello", return "olleh".

分析:

var reverseString = function(s) {
    return s.split("").reverse().join("");
};
原文地址:https://www.cnblogs.com/gogolee/p/6656304.html