Im trying to save a simple array [5,2] on Local Storage and then collecting it . i save it succesfully but when im trying to collect it using "JSON.parse" it didn't work and show me this error : "Uncaught SyntaxError: Unexpected token m in JSON at position 0 at JSON.parse () at HTMLAnchorElement.addo"
I trying to rewrite many code on many ways , but the same error appeared
numbers=new Array();
numbers.push(5);
numbers.push(2);
localStorage.setItem("items",numbers);
let data=localStorage.getItem("items");
data=JSON.parse(data);
console.log(data);
i except that i will had my previous array , but i had an error .