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

Annika Song
Annika Song
2,033 Points

what does ll mean?

Thanks for answering the question

5 Answers

Hi there,

|| usually represents OR logic in a conditional statement. When you have two or more conditions and you want some code to execute if any one of them is true, you use "or" logic. It's the counterpart to &&, or "and" logic, where you want all conditions to be true before a block will execute.

It can be written something like:

if (firstCondition || secondCondition || thirdCondition) {  //this will execute if ANY one of these is true
   //do some stuff
}
Annika Song
Annika Song
2,033 Points

HI Katie

Can you just send me your code for mash?

you could copy and past it

thanks a lot

Hi Annika,

I'm afraid I'm not taking the course right now, and past projects are on a computer I don't have access to at the moment. If you want, though, you could share your code and I can help you figure out anything you're having trouble with :)

Annika Song
Annika Song
2,033 Points

how do I post my code?

thanks a lot

If you're using a workspace, I believe you can post a link to it and I can create my own copy of it, which will let me see everything you have. If you're not using a workspace, I guess we'll just have to do a good ol' copy-paste.

Annika Song
Annika Song
2,033 Points

OH I can't go in the course cause I'm finished. Thank you for everything until now and if I could help you later on I would be glad to. I appreciate everything you did for me. Thanks a lot

No problem - feel free to ask if there are any specific code questions I can answer. You can usually access old course work on your Workspaces page.