I am trying to create a code in Node.JS that will get an array with values and will pass it to a function but without success..
This is my code:
var tmpArr = [];
tmpArr.push('"2015-04-27", "12345", "http://thispage.com/2.html", 1, 1, 0, 0');
tmpArr.push('"2015-04-25", "34567", "http://thispage.com/2.html", 0, 0, 1, 1');
tmpArr.push('"2015-04-25", "34567", "http://thispage.com/2.html", 0, 0, 1, 1');
function reportPages(arr) {
for (i in arr){
putPage(arr[i]); //this did not work
}
}
function reportPages(arr) {
for (i in arr){
putPage(eval(arr[i])); //this did not work eater
}
}
reportPages(tmpArr)
Thanks to all the helpers!