+ 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

28th Feb 2018, 10:36 PM
Mouhamed Gassama
Mouhamed Gassama - avatar
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.
1st Mar 2018, 12:35 AM
Tamra
Tamra - avatar
+ 2
ok i'm gonna try r answer
1st Mar 2018, 12:44 AM
Mouhamed Gassama
Mouhamed Gassama - avatar
+ 1
java script.
28th Feb 2018, 10:55 PM
Mouhamed Gassama
Mouhamed Gassama - avatar
+ 1
i know so the exercise is in french so that i would like to delete with "replace" these words " le,les,des,une"
28th Feb 2018, 10:57 PM
Mouhamed Gassama
Mouhamed Gassama - avatar