xxxxxxxxxx
let a = "123,456,789"; // remove all , in string
a = a.split(',').join('');
xxxxxxxxxx
var str = 'aba';
str.replace('a', ''); // results in 'ba'
str.replace(/a/g, ''); // results in 'b'
xxxxxxxxxx
removeFirstChar = str.slice(1);
removeLastChar = str.slice(0, str.length - 1);