hello, i want to replace month name by number in array, but my script doesnt work.
for(i=0; i<a.length; i++) {
arr = arr.replace(/Jan/g, "01");
}
Can somebody help me please?
hello, i want to replace month name by number in array, but my script doesnt work.
for(i=0; i<a.length; i++) {
arr = arr.replace(/Jan/g, "01");
}
Can somebody help me please?
Try this:
for(i=0; i<a.length; i++) {
arr[i] = arr[i].replace(/Jan/gi, "01");
}
Also... Shouldn't the line be:
for(i=0; i < arr.length; i++) {