1 decade ago by paulh
Hi all
I have a large wordlist (over 100K) and im trying to find the best/fastest way to check against the words, i read that "in" is the quickest function but i cnat seem to get it to return correct values :
The array is in the format:
Ive tried lots of variations to try to get a true value for HELLO using in, is it possible? IS this the quickest way of checking a large array?
Also, if i had a word :
HELLO
How can i quickly check for
HELL
and
HELLO
Many thanks!
I have a large wordlist (over 100K) and im trying to find the best/fastest way to check against the words, i read that "in" is the quickest function but i cnat seem to get it to return correct values :
console.log ("HELLO" in ig.game.word)
The array is in the format:
ig.game.word = [ "HI" , "YO'' , "HELLO"];
Ive tried lots of variations to try to get a true value for HELLO using in, is it possible? IS this the quickest way of checking a large array?
Also, if i had a word :
HELLO
How can i quickly check for
HELL
and
HELLO
Many thanks!