Here is the complete code I am working on
My goal is to save the visited array to local storage. Then, I want to use an if statement to check if the array has been stored. If it has, the code will execute:
return;
This will end the code execution and make the button non-functional. For example:
if (store.length == 3) {
document.getElementById('btn').className = 'maxques';
alert('You have completed this category');
console.log(store);
return; }
I am struggling with finding a way to properly store the array. I have tried using JSON.stringify followed by JSON.parse but without success. Any suggestions or ideas?