Tell us what’s happening:
Please help, I am on the last one and I no longer recognize where I have went wrong. I also tried the removeItem method but it didn’t work either
Your code so far
/* file: script.js */
deleteBookmarkBtn.addEventListener('click', ()=>{
const checkedBM = categoryList.querySelector("input:checked");
const bookmarks = getBookmarks();
if(!checkedBM){
return;
}else{
const newBookMark = bookmarks.filter( bookmark=> bookmark.name &&bookmark.category === checkedBM.name && checkedBM.category);
localStorage.setItem('bookmarks',JSON.stringify(newBookMark));
renderBookmarks();
}
})
<!-- file: index.html -->
/* file: styles.css */
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Safari/537.36
Challenge Information:
Build a Bookmark Manager App - Build a Bookmark Manager App