# and

## Description

'and' operator is a boolean operator that returns true if both operands are true and returns false otherwise.

## Input / Parameter

| Name   | Description                        | Input Type | Default | Options | Required |
| ------ | ---------------------------------- | ---------- | ------- | ------- | -------- |
| value1 | The first boolean value to check.  | Boolean    | -       | -       | Yes      |
| value2 | The second boolean value to check. | Boolean    | -       | -       | Yes      |

## Output

| Description                                                       | Output Type |
| ----------------------------------------------------------------- | ----------- |
| Returns true if both operators are true, returns false otherwise. | Boolean     |

## Callback

N/A

## Video

Coming Soon.

## Example

The user wants to check if value 1 and value 2 are both true and return the result in the console.<br>

### Step

1. Call the function `and` inside the `console` function.\
   value1 : greater (value1: 3000 and value2: 1100)\
   value2 : true<br>

   ![](https://399701567-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwmJ1RKjM2uNFaL6fO3Xu%2Fuploads%2Fgit-blob-565bba561d6329431450932c00b5d07960b731e2%2Fand-step-1.png?alt=media)
2. Call the function `greater` inside the parameter `value1` and set `value2` to 'true'.

   ![](https://399701567-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwmJ1RKjM2uNFaL6fO3Xu%2Fuploads%2Fgit-blob-0b30a795441419855fec5367a58310fe337eca07%2Fand-step-2.png?alt=media)

   ![](https://399701567-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwmJ1RKjM2uNFaL6fO3Xu%2Fuploads%2Fgit-blob-8001e185f0f6e49ee24406fef2c84db15f49b332%2Fand-step-3.png?alt=media)

   ![](https://399701567-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwmJ1RKjM2uNFaL6fO3Xu%2Fuploads%2Fgit-blob-c76dee1b4132ad860c56fea703bd35257692bd59%2Fand-step-4.png?alt=media)

### Result

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

## Links
