Answer the question
In order to leave comments, you need to log in
How to translate c++ function to js?
Hey!
Please help translate c++ function to js.
unsigned int HashFAQ6(const char * str)
{
unsigned int hash = 0;
for (; *str; str++)
{
hash += (unsigned char)(*str);
hash += (hash << 10);
hash ^= (hash >> 6);
}
hash += (hash << 3);
hash ^= (hash >> 11);
hash += (hash << 15);
return hash;
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question