Pages
Introduction
Getting Started
Recipes
Reference
Literals
Arrays
Tuples
Type System
Functions
Modules
Records
Enums
Built-in Types
Constants
Equality
Stores
Routing
Comments
Control Expressions
Components
Properties
Computed Properties
Styling Elements
Connecting Stores
Using Providers
Internal State
Referencing Entities
Global Components
Lifecycle Functions
Directives
JavaScript Interop
Environment Variables
Packages
Control Expressions
In Mint, control structures are expressions that return a value, so they are called control expressions.
Here are the control expressions:
- if...else - basic, 2 way conditional expression
- case - extended, N-way conditional expression
-
for...of
- iteration over
Array(a)
Set(a)
andMap(a,b)
- try - executes a sequence of synchronous expressions, including failure handling
- sequence - executes asynchronous expressions in sequence, including failure handling
- parallel - executes asynchronous expressions in parallel, including failure handling
-
next
- locally modifies
state
variables