Build a Bookmark Manager App - Build a Bookmark Manager App

Tell us what’s happening:

I actually do not understand why the test 11 is not passing because I correctly pushed the object into the array before updating it. What am I getting wrong?

Your code so far

/* file: script.js */
addBookmarkButtonForm.addEventListener('click', ()=> {
const name =  document.getElementById('name');
const url = document.getElementById('url');
const bookmarks = getBookmarks();
bookmarks.push({name: name.value, category: categoryDropdown.value, url: url.input})
 localStorage.setItem('bookmarks', JSON.stringify(bookmarks))
name.value = "";
url.value = "";
displayOrCloseForm()
console.log(data)
})

<!-- 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

How are you trying to debug your code? Have you checked to make sure each of the values you are pushing to bookmarks is valid?

Where is the data variable in this function?

1 Like