Flow control statements control when and where code is executed (how it flows). The following keywords are parts of LSL flow control.

Keyword Purpose
if-else Execute some statements if a condition is true, other statements otherwise.
while Execute some statements as long as a condition is true.
do-while Execute some statements at least once, and then as long as a condition is true.
for Execute some statements a set number of times.
jump Jump to another part of a function or event.
return Exit a function or event, possibly returning a value.
state Transition from one script state to another.


Credit to: Lslwiki.net (not working) with changes made for brevity and clarity.