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![](https://ecs-static.teamtreehouse.com/assets/views/marketing/shared/community-banner-white-47072046c51352fe6a69f5e691ff5700b28bb11d45197d7bdf066d9ea3f72d0c.webp)
![Michael Fazekas](https://uploads.teamtreehouse.com/production/profile-photos/7643682/micro_me.jpg)
Michael Fazekas
3,070 PointsReferenceError: docment is not defined at HTMLButtonElement.
I'm trying to a simple to do app and I keep getting : ReferenceError: docment is not defined at HTMLButtonElement I've looked on stackOverFlow and Google tried a couple things still not working..
HERE IS JavaScript Code
const addItemInput = document.querySelector('input.addItemInput');
const addItemBtn = document.querySelector('button.addItemBtn');
const listContainer = document.querySelector('todo-container');
addItemBtn.addEventListener('click', ()=>{
const ul = docment.getElementsByTagName('ul')[0];
let li = document.createElement('li')
li.textContent = addItemInput.value;
ul.appendChild(li);
});
HTML will comment in.
2 Answers
![Dmitry Polyakov](https://uploads.teamtreehouse.com/production/profile-photos/10754089/micro_28217573.jpg)
Dmitry Polyakov
4,989 PointsInstead of docment should be document.
![Michael Fazekas](https://uploads.teamtreehouse.com/production/profile-photos/7643682/micro_me.jpg)
Michael Fazekas
3,070 PointsI need to get my eyes check 😂 I read right over it 10x’s didn’t even notice it
Thank you!
![Michael Fazekas](https://uploads.teamtreehouse.com/production/profile-photos/7643682/micro_me.jpg)
Michael Fazekas
3,070 PointsMaybe to if I paid attention to the reference error where it said docment lol
Michael Fazekas
3,070 PointsMichael Fazekas
3,070 PointsHTML code: