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 trialDoron Geyer
Full Stack JavaScript Techdegree Student 13,897 Pointsnot working as shown in the video
using
const myParagraph = document.getElementsByTagName('p')
gives me the error
Uncaught SyntaxError: Identifier 'myParagraph' has already been declared
at <anonymous>:1:1
Doron Geyer
Full Stack JavaScript Techdegree Student 13,897 PointsKRIS NIKOLAISEN for some reason I cant respond to your below post. the workspace used was the default one and the commands that are giving errors were entered under console.log so cant really post it here as such. I followed the video info as prescribed.
The only change that I made to get it to work properly was the name of the const. nothing else.
1 Answer
KRIS NIKOLAISEN
54,972 PointsCan you post a snapshot of your workspace with the const myParagraph error?
Doron Geyer
Full Stack JavaScript Techdegree Student 13,897 PointsDoron Geyer
Full Stack JavaScript Techdegree Student 13,897 Pointsso seems like there's some issue with the const "myParagraph". when I change the given name to const "testIt" then the code works as shown in the video.
I am using the default workspace provided for the video and I also deleted the workspace and restarted it anew to assure that it was not a change I had made by mistake.