and
Last updated
'and' operator is a boolean operator that returns true if both operands are true and returns false otherwise.
value1
The first boolean value to check.
Boolean
-
-
Yes
value2
The second boolean value to check.
Boolean
-
-
Yes
Returns true if both operators are true, returns false otherwise.
Boolean
N/A
Coming Soon.
The user wants to check if value 1 and value 2 are both true and return the result in the console.
Call the function and inside the console function.
value1 : greater (value1: 3000 and value2: 1100)
value2 : true

Call the function greater inside the parameter value1 and set value2 to 'true'.



The console will print 'true' since value1 will return 'true' (3000 is greater than 1100) which matches the input for value2 (true).
Last updated