

0 / 2 embers
0 / 3000 xp
click for more info
Complete a lesson to start your streak
click for more info
Difficulty: 5
click for more info
Not enough gems
Cost: 6 gems
1: Conditionals
incomplete
2: Comparison Operators
incomplete
3: Logical Operators
incomplete
4: Switch
incomplete
5: Ternary Operator
incomplete
6: When to Ternary
incomplete
7: Truthy and Falsy
incomplete
8: Nullish Coalescing
incomplete
Back
ctrl+,
Next
ctrl+.
This lesson's interactive features are locked, please to keep using them
In Python, the logical operators are simply their English names:
and
or
not
In JavaScript, the equivalent logical operators use symbols:
&& (and) - Returns true if both conditions are true
|| (or) - Returns true if either of the conditions are true
! (not) - Returns true only if the input is false
true && true; // true
true && false; // false
true || false; // true
false || false; // false
!false; // true
!true; // falseThis syntax matches many other languages like Go, Rust, and C.
Textio needs to determine whether an SMS campaign is considered "high-engagement".
A campaign qualifies as having high-engagement if it meets the following criteria:
It has a high open rate
It is a recent campaign
It either has a strong reply rate or can be sent again
It is not flagged as spam
Set the isHighEngagement variable using the given conditions and the appropriate logical operators. Remember that you can specify an "order of operations" by using parentheses.