Quick actions

cmd+k|ctrl+k

Navigation

Languages

remove from string

Snippet info

Language

JavaScript

Visibility

public

Author

danielmg17

Created

2019-05-31T17:48:17Z

Updated

2019-05-31T17:48:46Z

function remove(x,xs) {
    return xs.slice(0,x) + xs.slice(x+1);
}


var arr = "abcdefg";
//         0123456
var nu = remove(3,arr);
console.log("s : "+arr);
console.log("s': "+nu);
INFO