DEV Community

loading...

Discussion on: Daily Challenge #1 - String Peeler

Collapse
nedyudombat profile image
Nedy Udombat

Javascript

const strip = (string) => {
  if(string.length <= 2) return 'Invalid'
  return string.substring(1, string.length-1)
}
Forem Open with the Forem app