I want something like this:
var string = "apple banana";
var array = ["apple", "banana", "orange", "grape"];
for(var i=0;i<array.length;i++){
if(array[i] is found in (string) {
remove the value;
}
}
something like that. so basically, it would:
Declare a string and an array
Iterate through the array
If the array[i] value is present exactly in the string, it would remove it
- The iteration should continue as normal
In case it still doesnt make sense:
String is "1 3 b c"
Array contains "1", "2","3", "a", "b", "c"
The array should now only contain "2" and "a".