0
the case is the following. I have a script that I wanted to use and as in all questions "I suppose" I do not know how to do. The following I want to do an array data search with javascript "pq do not suggest other languages if your answer is not in javascript please do not answer" inside another array like this:
i have the length array:
var comprimentos = new Array('OI', 'OLA', 'IAI', 'BLZ', 'TESTE', 'TUDO BEM', 'JOIA');
but to cover all options such as 'hi? ' which is different from 'hi' due to the interrogation I created a second array
var int = new Array('?', '!', '');
so I thought of something like this:
var comprimentos = new Array('OI'+int[y], 'OLA'+int[y], 'IAI'+int[y], 'BLZ'+int[y], 'TESTE'+int[y], 'TUDO BEM'+int[y], 'JOIA'+int[y]);
where var y is equivalent to a random number ranging from 0 to 2
but I have to confirm several times the code is giving too much error help me there
It got a little confusing. You want to check whether a given text contains any of the var length terms, but there may be variations of the second array, what interferes with the search for the items in the first array is this?
– Alexandre Cavaloti
BASICALLY HE DID THE FOLLOWING:
– Claudio Santos
WHEN I RESEARCHED HI HE GAVE THE PROGRAMMED ANSWER BUT PUT HI! NO LONGER GAVE. AND THE FINAL USER YOU KNOW HOW IT IS: UNPREDICTABLE! THEY WRITE THINGS LIKE IAI AND YOU KEEP THINKING HE’S GONNA WRITE HI
– Claudio Santos