var arrayToList = function(array){
var list = null;
for (i = array.length-1; i >= 0;i--){
list = {value:array[i], next:list};
console.log(array[i]);
}
return list;
}
console.log(arrayToList([10,20,30,40,50]));
for (i = array.length-1...
for (var i = 0; i <= array.length-1 ; i++)