I have a string variable that has exactly 44 characters:
02081516171821242936374750565865666871737476
I need to split it into an array like this:
arr[0]=02
arr[1]=08
.
.
arr[21]=76
How can I do that? Thanks.
EDIT:
I know it must be easy but I couldn't find the necessary jquery functions to do it. Here is the pseudocode:
var s = "02081516171821242936374750565865666871737476";
var tmp;
var index=0;
for i =0 to 21
arr[0] = mid(s,index,2); // take two characters starting from "index"
index=index+2;
next i
I just need the syntax.