scrimba
Learn JavaScript
Practice part 3
addEventListener and object in array
Go Pro!Bootcamp

Bootcamp

Study group

Collaborate with peers in your dedicated #study-group channel.

Code reviews

Submit projects for review using the /review command in your #code-reviews channel

addEventListener and object in array
AboutCommentsNotes
addEventListener and object in array
Expand for more info
index.js
run
preview
console
let data = [
{
player: "Jane",
score: 52
},
{
player: "Mark",
score: 41
}
]

// Fetch the button from the DOM, store it in a variable
// Use addEventListener() to listen for button clicks
// Log Jane's score when the button is clicked (via data)
Console
/index.html
-2:39