Syntax Lookup

Enter some language construct you want to know more about.
This is the for loop.

ReScript supports for loops.

For loops can iterate from a starting value up to (and including) the ending value via the to keyword, or in the opposite direction via the downto keyword.

Example

ReScriptJS Output
// Using `to`
for x in 1 to 3 {
  Console.log(x)
}

// Using `downto`
for y in 3 downto 1 {
  Console.log(y)
}

References