HackerRank Problem Link
JS Solution
if (typeof s === "string") { console.log( s .split("") .reverse() .join("") ); } else { console.log("s.split is not a function" + "\n" + s); }
Last updated 3 years ago
Was this helpful?