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 trialGina Bégin
Courses Plus Student 8,613 PointsIn myscript.js, set bgColor to "blue" and textColor to "FF9933". Can't get it...?
I have this code — it keeps telling me I haven't set the bgColor. I've tried a few different configurations. What am I doing wrong?
<script src="myscript.js"> var bgColor = "blue"; var textColor = "#FF9933"; </script>
2 Answers
Hugo Paz
15,622 PointsHi Gina,
Your code is correct. You just put it in the wrong place. You need to put the variables inside the myscript.js file. You can see a tab on the challenge window with that name.
Gina Bégin
Courses Plus Student 8,613 PointsSMH Thank you.
Agapito Cruz
21,486 PointsIf the instructions were to add those variables in myscript.js, then you don't need the <script></script tags. Those script tags are for use in html files.
Gina Bégin
Courses Plus Student 8,613 PointsGina Bégin
Courses Plus Student 8,613 PointsSorry, I forgot the markdown: