I have a string 123456789.
My aim is to get 1236789 after deleting 45.
I used slice method to delete the string 45.
var x = 123456789;
res = x.slice(4, 5); //my output is 45
I need the output to be 1236789
Any help would be appreciated.