Thanks for answering, man.
I'm not sure, but I think the problem I couldn't read the file as well before is because I'm just calling a function with a argument of string, where I use a string with the binary content of the criminal.dat, but I don't use XMLHttpRequest or any other thing to get the file content... I just paste it.
Your code works as well! You can change the line to make the loop more faster, though.
to
(Because, in JavaScript, the for numeral loop limit is always calculated, then the data string length will be calculated everytime, also.)
I'm not sure, but I think the problem I couldn't read the file as well before is because I'm just calling a function with a argument of string, where I use a string with the binary content of the criminal.dat, but I don't use XMLHttpRequest or any other thing to get the file content... I just paste it.
Your code works as well! You can change the line to make the loop more faster, though.
Code:
for (var i = 123, j = 0; i < data.length; i++, j++)
to
Code:
for (var i = 123, j = 0, len = data.length; i < len; i++, j++)
(Because, in JavaScript, the for numeral loop limit is always calculated, then the data string length will be calculated everytime, also.)