Conditional Statements

<if>, <else>, & <elseif> are the three elements utilized for conditional statements in VoiceXML. Each element should utilize a cond attribute specifying an ECMAScript boolean condition. Examples of the usage of each tag are shown below.

Example 1.

<if cond="total > 1000">
<prompt> This is too much to spend.</prompt>
</if>