Changed "statement" to "expression" (#39564)

The ternary operator doesn't allow statements, just expressions.
pull/39570/head
Aleksa S. Stevic 2020-09-12 10:37:59 +02:00 committed by GitHub
parent ae6cf5b724
commit 5cb609dc5c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -9,7 +9,7 @@ forumTopicId: 301181
<section id='description'>
The <dfn>conditional operator</dfn>, also called the <dfn>ternary operator</dfn>, can be used as a one line if-else expression.
The syntax is:
<code>condition ? statement-if-true : statement-if-false;</code>
<code>condition ? expression-if-true : expression-if-false;</code>
The following function uses an if-else statement to check a condition:
```js