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

Jonas Wu
13,928 PointsUncaught SyntaxError: Identifier 'form' has already been declared?
Hello guys,
I just follow this video, trying to create li after submitting the value i key, But the li didn't show up. I checked the console and type my code into it, i got these error "Uncaught SyntaxError: Identifier 'form' has already been declared" Could anyone tell me what i was missing? thank you :)
code: const form = document.getElementById('registrar'); const input = form.querySelector('input');
form.addEventListener('submint', (e) => {
e.preventDefault();
const text = input.value;
input.value = '';
const ul = document.getElementById('invitedList');
const li = document.createElement('li');
li.textContent = text;
ul.appendChild(li);
});
video link: https://teamtreehouse.com/library/rsvp-checkbox
1 Answer

Steven Parker
242,296 PointsI don't see a cause for that particular error. It might help if you share your entire workspace.
I do see one other issue where you wrote "submint:" (with an extra "n") instead of "submit".