DEV Community

Discussion on: Daily Challenge #1 - String Peeler

Collapse
 
ronakjethwa profile image
Ronak Jethwa
function remove_ends(str) {
    return str.length <= 2 ? null : str.substr(1,str.length-2);
}
remove_ends("string");