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

sohee kim
sohee kim
234 Points

How can you tell which one is the JS sentence or not as a beginner? I can't tell the difference.

They say " var winningScore = 100" is a JS. But, "<script src="phaser . js"></script>" is not JS.

To me, those examples are look similar or same.

1 Answer

Jason Anders
MOD
Jason Anders
Treehouse Moderator 145,860 Points

Hi Sohee

The first one there is a JavaScript line of code. the var keyword is defining a variable named "winningScore" and assigning the int value of 100 to it.

The second one is HTML. This can be spotted by the HTML tags that are enclosed within the <>. There will usually be an opening one and a closing one. In your example these would be <script> </script>.

If you're very new to coding, I strongly recommend you completing the Digital Literacy Track here on Team Treehouse before proceeding into a full on language course. The Digital Literacy will give you the basics need to further you learning, and things will make much more sense.

Keep Coding! :) :dizzy: