+ 2
need a help
i would like to use a function to delete noun(le,la,les,des,une) in a string with "replace" for example if i write "the language i learn is js" will be"language i learn" please guys, i need an answer now
5 Answers
+ 5
To use replace() to remove a string, have the replace text be empty quotes. Also, so there isn't an extra space in the final sentence, have the word you're looking for have a space at the end or start. Ex:
phrase.replace("une ", "");
phrase.replace(" les", "");
Use one replace() statement for each word you want to replace.
+ 2
ok i'm gonna try r answer
+ 1
java script.
+ 1
i know so the exercise is in french so that i would like to delete with "replace" these words "
le,les,des,une"