---
title: "Discussion on \"Interesting use of && (AND) operator in JavaScript\" | Hashnode"
description: "Discussion on \"Interesting use of && (AND) operator in JavaScript\". The && (AND) operator is generally used to check if both sides of the operator are true.\nIt continues if both sides are true, otherwise, it stops.\nLet's see in action:\nif(a > 5 && a <10) {console.log(\"a is between 5 and 10\");}\n    else {console.log(\"..."
url: "https://hashnode.com/posts/interesting-use-of-and-operator-in-javascript/642de398189b13ee15431cbf"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Interesting use of && (AND) operator in JavaScript](https://yccodes.hashnode.dev/interesting-use-of-and-operator-in-javascript?utm_source=hashnode&utm_medium=feed)

The && (AND) operator is generally used to check if both sides of the operator are true. It continues if both sides are true, otherwise, it stops. Let's see in action: if(a > 5 && a <10) {console.log("a is between 5 and 10");} else {console.log("...

Apr 5, 2023 · 2 min read · yccodes.hashnode.dev  
Read the article

-   [#javascript](https://hashnode.com/tag/javascript)
-   [#and-operator](https://hashnode.com/tag/and-operator)
-   [#boolean](https://hashnode.com/tag/boolean)

## Written by

[Yusuf Cinar](https://hashnode.com/@yccodes)

@yccodes · Turkey

  
[View profile](https://hashnode.com/@yccodes)

I write about my journey on web3 development.

I am a Electronics Engineer working on Air Traffic Surveillance Systems. Changing my carrier to web3 development. I document my learning so if you join me we can learn together!

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
