I\'m trying to loop through localStorage to get ALL items through localStorage.length that works with my search algorithm. If i change: i < localStorag
localStorage is an object, not an array.
Try for(var i in window.localStorage):
for(var i in window.localStorage){
val = localStorage.getItem(i);
value = val.split(","); //splitting string inside array to get name
name[i] = value[1]; // getting name from split string
}