Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

JavaScript JavaScript and the DOM (Retiring) Getting a Handle on the DOM Select All Elements of a Particular Type

It says document.gerElementsByTagNames is not a function

const myList = document.gerElementsByTagNames("li"); for(let = i; i<myList.length; i++){ myList[i].style.color= "red"; }

I have no idea why it says that please help.

getElementsByTagName // change r to t

Thank but it still does not work. Still get the same error

const myList = document.getElementsByTagNames("li");
for(let = i; i<myList.length; i++){
  myList[i].style.color= "red";
} 


error: ==> app.js:1 Uncaught TypeError: document.gerElementsByTagNames is not a function

2 Answers

Your error still shows ger so you probably need to refresh the page or console. Also, there should be name not names at the end

Thanks!

Jesus, can't believe how retarded people can be.

lol with your 130 points