Skip to content

Commit b7a5d73

Browse files
author
G. Kay Lee
authored
Update README.md
1 parent 4736752 commit b7a5d73

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -1918,7 +1918,7 @@ function hashIt(data) {
19181918
// Loop through every character in data
19191919
for (var i = 0; i < length; i++) {
19201920
// Get character code.
1921-
var char = i.charCodeAt(i);
1921+
var char = data.charCodeAt(i);
19221922
// Make the hash
19231923
hash = ((hash << 5) - hash) + char;
19241924
// Convert to 32-bit integer
@@ -1935,7 +1935,7 @@ function hashIt(data) {
19351935
var length = data.length;
19361936

19371937
for (var i = 0; i < length; i++) {
1938-
var char = i.charCodeAt(i);
1938+
var char = data.charCodeAt(i);
19391939
hash = ((hash << 5) - hash) + char;
19401940

19411941
// Convert to 32-bit integer

0 commit comments

Comments
 (0)