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 Introducing JavaScript Let's Make a Game Welcome to Web Programming

You've seen a bit of JavaScript programming already. Can you pick out the example below which is NOT JavaScript?

I think this is a trick question to see if I'm paying attention to details about JavaScript but if not I think all of A, B ,C are all related to Javascript

Tim Strand
Tim Strand
22,458 Points

Related perhaps. But which one if you put it in a .js file would result in invalid code? 1 answer is valid HTML and 2 are valid JS

1 Answer

The script tags are part of the markup. You could wrap this in a string and it could be JS but in this case (without any quotes) this is not a string literal.

  • These angle brackets are not part of the JS syntax.
  • They are not wrapped into quotation marks to form a string