<if>
Last updated
Last updated
The <if>
element is used for conditional logic. It has optional <else>
and <elseif>
elements.
Name | Data type | Description |
---|---|---|
Note that the <else>
and <elseif>
tags both must contain a trailing forward slash to terminate.
The output of the above script would be:
Computer: Say the magic number between one and nine. Human: Three. Computer: Try again. Say the magic number between one and nine. Human: Six. Computer: You're close. Try again. Say the magic number between one and nine. Human: Five. Computer: You guessed correctly!
<audio>, <assign>, <clear>, <data>, <disconnect>, <else>, <elseif>, <enumerate>, <exit>, <foreach>, <goto>, <if>, <log>, <prompt>, <reprompt>, <return>, <script>, <submit>, <throw>, <value>, <var>
<block>, <catch>, <error>, <filled>, <foreach>, <help>, <if>, <noinput>, <nomatch>
cond
An ECMAScript expression to evaluate.