MV What syntax should I use for 2 conditions in my sentence?

Condition line:
$gameSwitches.value(33) == true; and
$gameSwitches.value(34) == true;

I have 2 conditions, they are perfect, tell me what syntax to use for the conditions so that they are on the same line, I am interested in the AND and OR operator, I’m actually not that strong in JS.
First of all, in JavaScript, you may leave out the == true check. Then, you have two operators, && (and) and || (or).

Code:
$gameSwitches.value(33) && $gameSwitches.value(34)
$gameSwitches.value(33) || $gameSwitches.value(34)

You put the ;-symbol only at the end of statements, not queries.

Example:
Code:
if ($gameSwitches.value(33) && $gameSwitches.value(34)) {
  doSomething(); // <----
} else {
  doSomethingElse(); // <---
}
First of all, in JavaScript, you may leave out the == true check. Then, you have two operators, && (and) and || (or).

Code:
$gameSwitches.value(33) && $gameSwitches.value(34)
$gameSwitches.value(33) || $gameSwitches.value(34)

You put the ;-symbol only at the end of statements, not queries.

Example:
Code:
if ($gameSwitches.value(33) && $gameSwitches.value(34)) {
  doSomething(); // <----
} else {
  doSomethingElse(); // <---
}
Yes it works, thanks for the help) Good luck and happiness to you)
I’m actually not that strong in JS.
Got ninja'd on the answer, but id suggest taking your time and going through a javascript tutorial. conditionals and logical operators are on one of the first things thats usually taught. you could have possibly gotten your answer faster going through a guide from the very beginning or looking up how logical or is used than asking with a new thread and waiting for the answer
Got ninja'd on the answer, but id suggest taking your time and going through a javascript tutorial. conditionals and logical operators are on one of the first things thats usually taught. you could have possibly gotten your answer faster going through a guide from the very beginning or looking up how logical or is used than asking with a new thread and waiting for the answer
+1 to this. Googling the words in your post: "javascript and operator" immediately brings up the relevant tutorial pages.

Thanks, I'll definitely use this
Got ninja'd on the answer, but id suggest taking your time and going through a javascript tutorial. conditionals and logical operators are on one of the first things thats usually taught. you could have possibly gotten your answer faster going through a guide from the very beginning or looking up how logical or is used than asking with a new thread and waiting for the answer
Ahaha, you're right, but I'm not a ninja, I really should have read the manual first, and my quick answer, because I found the answer and article I needed, I just didn't bother too much, but I use C# very often, and I'm just getting acquainted with JS, That’s why sometimes there are such stupid questions, I don’t know how to delete a thread yet, so I felt a little ashamed, I’m just learning, thanks anyway.

Original thread: https://forums.rpgmakerweb.com/threads/what-syntax-should-i-use-for-2-conditions-in-my-sentence.166524/