1string = 'abcdefghi'
2
3# Removing the 3rd idx:
4
5#-----------------------------------
6# Method 1:
7#-----------------------------------
8
9arr = list(string)
10
11arr.pop(3)
12
13string = ''.join(arr)
14
15# string is now => 'abcefghi'
16
17#-----------------------------------
18# Method 2:
19#-----------------------------------
20
21string = string[:3] + string[4:]
22# string[:idx_to_remove] + string[idx_to_remove_plus_1:]
23
24# string is now => 'abcefghi'
25
1// removing char at index 3
2var str = "Hello World";
3str = str.slice(0, 3) + str.slice(4);
4
5console.log(str) // Helo World