how to add data to local storage and fetch from there to display like todo list and delete the same in the local storage code example
Example: index localstorage object
const data = [
{id: 'jijijoj',rating: 'g'},
{id: 'iojiojoi',rating: 'r'},
{id: 'eawfe',rating: 'pg'},
{id: 'ewfewfwe',rating: 'g'},
{id: 'ewfewfew',rating: 'r'}
];
// get index of element with id `iojiojoi`
const index = data.findIndex(item => item.id === 'iojiojoi');
console.log(index);