Skip to content
Discussion options

You must be logged in to vote

You'll have to wrap p with $() inside the loop:

let items = $(".things p")
for (let p of items) {
  console.log($(p).text())
}

Oddity from the jQuery heritage, but hope this makes sense!

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
1 reply
@erikschul
Comment options

Answer selected by erikschul
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants