DEV Community

loading...

Discussion on: Daily Challenge #1 - String Peeler

Collapse
spyrosko profile image
spyrosko • Edited
function word(str) {

   let i = str.slice(1, -1);

   if (i) {
      return i;
   } else {
      return 'null';
   }
}
Forem Open with the Forem app