VOOZH about

URL: https://www.geeksforgeeks.org/javascript/and-logical-operator-in-javascript/

⇱ AND(&&) Logical Operator in JavaScript - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

AND(&&) Logical Operator in JavaScript

Last Updated : 23 Jul, 2025

The logical AND (&&) (logical conjunction) operator for a set of boolean operands will be true if and only if all the operands are true. Otherwise, it will be false. It's commonly used to combine conditions in conditional statements or to check multiple conditions before executing code.

The Logical AND(&&) Operator can also be used on non-boolean values also. AND operator has higher precedence than the OR operator.

Syntax:

a&&b

Example 1: In this example, we will use the AND operator on normal values.

Output:

false
true
0
2
true
true

Example 2: In this example, we will use the AND operator on function calls

Output:

true

Supported Browsers:

We have a complete list of JavaScript Logical Operators, to learn about those please go through JavaScript Logical Operator article.

Comment
Article Tags: