DEV Community

Discussion on: Daily Challenge #1 - String Peeler

Collapse
dimitrilahaye profile image
Dimitri Lahaye

Here in JS

function remove(str) {
  if (str.length >= 3) {
    return str.slice(1, -1);
  }
}