javascript - trouble with delete user input -
i'm trying make array saves local storage , user can sort items, add item, delete item, , clear local storage. i'm having lot of trouble getting delete or splice user input work can please provide me advice. this code have far please forgive me if it's bad, keen know how can made better. ... <script> //lets program know books1 variable array var books1 = [] //lets program know result variable string var result = "" //checks see if localstorage key booksarray exists, if doesn't books1 has 3 books added ans stored locally key of booksarray if (localstorage.getitem("booksarray") == null) { books1 = ["book1", "book2", "book3", "m", "p"] localstorage.setitem("booksarray", json.stringify(books1)) // var thearray = json.parse("booksarray") } else { loadbooks(); //loads books array variable name listbooks } ...