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

Jonathan Aldas
Jonathan Aldas
2,421 Points

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.

Jonathan Aldas
Jonathan Aldas
2,421 Points

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

Tobiasz Gala
seal-mask
.a{fill-rule:evenodd;}techdegree
Tobiasz Gala
Full Stack JavaScript Techdegree Student 23,529 Points

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

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

lol with your 130 points