DEV Community

Discussion on: Daily Challenge #1 - String Peeler

Collapse
 
ronakjethwa profile image
Ronak Jethwa
return str.length > 2 ? str.slice(1,str.length-1) : str;