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 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