(id, value)
| 139 | |
| 140 | // add to local storage |
| 141 | function addToLocalStorage(id, value) { |
| 142 | const grocery = { id, value }; |
| 143 | let items = getLocalStorage(); |
| 144 | items.push(grocery); |
| 145 | localStorage.setItem("list", JSON.stringify(items)); |
| 146 | } |
| 147 | |
| 148 | function getLocalStorage() { |
| 149 | return localStorage.getItem("list") |
no test coverage detected