📌  相关文章
📜  Day 3: Try, Catch, and finally hackerrank 10 天的 javascript 解决方案 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:01:08.602000             🧑  作者: Mango

代码示例1
// Day 3: Try, Catch, and Finally hackerrank 10 days of javascript solution
function reverseString(s) {
  if (typeof s === "string") {
    console.log(s.split("").reverse().join(""));
  } else {
    console.log("s.split is not a function" + "\n" + s);
  }
}