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 Basics Making Decisions in Your Code with Conditional Statements The Conditional Challenge

Conditional Challenge coding quiz. I open the web link and no prompts.

Good afternoon! I went through the challenge and could not get it to run. No prompts appear, only blue screen. Watched video on how to solve and same problem. Still no prompts.

Thanks for any tips or pointers.

Code is linked in Git.hub to https://github.com/Aikitiger/Coding-challenges/commit/7b8e4915a2f29242f518ddcfc92ad4dbd196f7b9

1 Answer

Hi Kelly!

Your issue is this:

const main = document.query('main');

It should be this:

const main = document.querySelector('main');

I found the error checking the Chrome devtools console, which said this:

Uncaught TypeError: document.query is not a function

I hope that helps.

Stay safe and happy coding!