If, Else, End

Twine Version: 2.3.9
Story Format: Harlowe

How do I format “If,” “Else,” and “End” choices? I have tried multiple formats, including codes from the Twine Guide, but nothing seems to be working.
What I’m trying to do is make the choices affect the way the story goes. Like if you select “Option A,” the story goes one way, but “Option B” goes another way.

There are three different ways. The following example is taken from the Twine cookbook. The first line is just setting the variable, but the following three blocks are the different ways of doing conditionals.

(set: $animal to "horse")

(if: $animal is "dog")[It's a dog!]
(else:)[It's a horse!]

(unless: $animal is "dog")[It's a horse!]
(else:)[It's a dog!]

(set: $isDog to $animal is "horse")
$isDog[It's a dog!]