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) Traversing the DOM Using previousElementSibling and insertBefore

Kate C
Kate C
13,589 Points

prevLi is not defined?

Hello all,

Could someone tell me why prevLi is not defined?

https://imgur.com/a/CHvUYdN

2 Answers

Steven Parker
Steven Parker
231,275 Points

On line 109 it is created as "preLi" (without the "v").

For future posting, many issues can't be found easily (or at all) with screenshots. Instead, make a snapshot of your workspace and post the link to it here.

Kate C
Kate C
13,589 Points

Thank you so much, Steven!!

Steven Parker
Steven Parker
231,275 Points

Kate C — Glad to help. You can mark the question solved by choosing a "best answer".
And happy coding!