1

element.innerHTML = ''

*when getting objects in an array, remember that its an array methofrememebr that its an ARRAY method

   ex : array.forEach(element/or obj) depending if the obj is nested in the array
   dont forget .innerText = element
   if array in obj do res.nameofarray.forEach
prevetdefault is a method()

.value 

This is a question regarding javascript

likeButton.addEventListener('click', (e) => {
    let currentLikes = parseInt(likes.innerText)
    currentLikes++
    likes.innerText = currentLikes
})```
lamefedora
  • 21
  • 1

1 Answers1

0

I'm not 100% sure what your asking, but creating an array with arrayName = [' ', ' '] makes array have the values of spaces, not null's. If you want an array filled with null you have to create it with arrayName = [null, null] (you can also make an empty array and fill it with null's as shown here: Javascript - Initialize array with nulls)