JavaScript · Junior · Question 69 of 75

Why does document.querySelectorAll("li").map(...) throw?

Explanation

A NodeList has forEach and is iterable, but lacks most array methods. It is also static: it doesn't update when the DOM changes.

Further reading

Problem with a question

JavaScript · Junior · question 69

Test yourself

Take the JavaScript · Junior quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz