Answer the question
In order to leave comments, you need to log in
How to find specified words in an array?
hello everyone, I have a question about the task.
There are two inputs.
In the first input, the user enters a string, let's say "tacked tacked but didn't catch".
In the second input, the user enters "la".
Using the button should display words that contain "la", that is, "tacked tacked tacked"
Answer the question
In order to leave comments, you need to log in
Pseudocode:
input1 = "лавировали лавировали да не вылавировали"
input2 = "ла"
array = input1.split(" ")
result =""
for (i = 0; i < array.length; i++) {
if (array[i].includes(input2)) {
result += array[i]
}
}
return result
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question