DEV Community

loading...

Discussion on: Daily Challenge #1 - String Peeler

Collapse
rachit995_97 profile image
Rachit Sharma

Too late to the wagon, but here.

JS:

function peeler(str){
    return str.length > 2 ? str.slice(1).slice(0, str.length - 2) : null
}
Forem Open with the Forem app