You are viewing a single comment's thread. Return to all comments →
function reverseString(s) { try { let test = s.split(); } catch(e) { console.log(e.message) console.log(s); } finally { let reversedChars = []; let j = 0; for (let x = s.length; x >= 0; x--){ reversedChars[j] = s.charAt(x); j++; } reversedChars = reversedChars.join(""); return console.log(reversedChars); } }
Seems like cookies are disabled on this browser, please enable them to open this website
Day 3: Try, Catch, and Finally
You are viewing a single comment's thread. Return to all comments →