Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

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!