mirror of
https://github.com/alrayyes/wiki.git
synced 2024-11-25 13:06:22 +00:00
12 lines
196 B
Markdown
12 lines
196 B
Markdown
---
|
|
date: 20201112
|
|
id: 4a8846d3-a3c3-4edc-8fa1-a2de76f1094f
|
|
title: JavaScript Conditional (Ternary) Operator
|
|
---
|
|
|
|
# Syntax
|
|
|
|
``` javascript
|
|
console.log(true ? 1 : 2)
|
|
console.log(false ? 1 : 2)
|
|
```
|