+ 2

Is it possible to write a function that delete a element from string without built in function.

suppose we have a string "thisstring" and user input a character if character find in the string remove that character and make a new string without that chracter i.e var str ="string"; var chr="r"; output will be ="sting";

17th Apr 2018, 3:35 PM
Sharry Brar
2 Answers
+ 10
Built-in functions were written without other built-in functions, so clearly, it is possible.
17th Apr 2018, 3:53 PM
Hatsy Rei
Hatsy Rei - avatar
+ 5
I came up with this JS code for you. Hope it helps. This will imply knowing the index of the char to be removed... https://code.sololearn.com/Ww2AZV7oWWpo/?ref=app
17th Apr 2018, 3:50 PM
cyk
cyk - avatar