I am writing a function that should return a "random" number from a given string, starting with:
function hashNumberBetween(str, start, end){
....
return num;
}
hashNumberBetween('getjnigejgr', 0, 10);
hashNumberBetween('getjnigejgr', 0, 10);
hashNumberBetween('getjnigejgr', 0, 32);
hashNumberBetween('jukojmnktgo', 0, 10);
What is the right way to achieve the same combination with the same string? I believe this is some kind of hash function. Any online resource I can look at? This may be a very simple question, but I donβt know how to look for it.
source
share