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 Treehouse Club - MASH MASH - JavaScript Important Stuff - Part 3

Emanuel Rios
Emanuel Rios
6,966 Points

what is the meaning of ll in JavaScript?

I'm doing the quiz about the game program called "MASH" created by JOY from Treehouse and i do not know what ll exactly means, can somebody help me? Thank YOU!

2 Answers

Jonathan Grieve
MOD
Jonathan Grieve
Treehouse Moderator 91,253 Points

I think you're referring to the || operator in JavaScript which translates as OR in JavaScript.

What this does is expands the possibilities of condition statements so that you can test for more than one value. So you're testing whether the value of an expression is true, or false.

If you're using OR in condition statements only one of the values you are testing as to be true for the given code block to run.

If you're using && or AND in your condition statements, all the conditions you test have to be true for the code block to run.

Emanuel Rios
Emanuel Rios
6,966 Points

Perfect! Thanks for your help Grieve