In this example, we are going to show you how to use the if, and ≠ buttons.

Firstly, create a question with answer choices (see image below). Choose Radio/Dropdown as your input. And configure the settings accordingly.

Open the Script Helper

and place your type cursor on line 4 between {} in the script editor. Select your output button.

Next, click on the if button. Replace condition by clicking your input button, the button, followed by typing '[your input property name]' of the fourth radio option.

Replace true with “Guess again” and false with “Correct!”.

Once you click Done, your codes should look like this:

'use strict'; return { misspell_answer: inputs.guess_spelling!=='correct_answer'? "Guess again": "Correct!", };

Your output should display this:

When a user selects the three misspelled choices, the output will show “Guess again”, because when any input that is not equal to correct_answer will display the true value.

While when the user selects the fourth option, the output will display the false value which is “Correct!”.

Did this answer your question?