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

Katie Wood
Katie Wood
19,044 Points

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

Katie Wood
Katie Wood
19,044 Points

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

Katie Wood
Katie Wood
19,044 Points

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

Katie Wood
Katie Wood
19,044 Points

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.