mirror of
https://github.com/alrayyes/wiki.git
synced 2024-11-25 04:56:23 +00:00
21 lines
371 B
Markdown
21 lines
371 B
Markdown
---
|
|
date: 2020-11-12
|
|
id: bf07be35-319c-4a57-8ee5-658e4591ec8c
|
|
title: JavaScript Logical Operators
|
|
---
|
|
|
|
# Syntax
|
|
|
|
``` javascript
|
|
console.log(true && false)
|
|
console.log(true && true)
|
|
console.log(false || true)
|
|
console.log(false || false)
|
|
```
|
|
|
|
! is a unary operator that flips the value given to it
|
|
|
|
``` javascript
|
|
console.log(true && !true)
|
|
console.log(true && !false)
|
|
```
|