Skip to content

Commit

Permalink
Add an example of declaring a variable using a ternary construct
Browse files Browse the repository at this point in the history
Fixes #157.
  • Loading branch information
annevk authored and domenic committed Nov 28, 2017
1 parent 2e70139 commit ad786ae
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions infra.bs
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,9 @@ over.
</ol>
</div>

<p class=example id=example-variable-ternary>Let |activationTarget| be |target|, if
|isActivationEvent| is true and target has activation behavior, and null otherwise.

<p>Variables must not be used before they are declared. Variables are
<a href=https://en.wikipedia.org/wiki/Scope_(computer_science)#Block_scope>block scoped</a>.

Expand Down

0 comments on commit ad786ae

Please sign in to comment.