expression
Expression statements are standalone expressions that are evaluated for their side effects. They represent expressions that are used as statements in Soul programs.Basic Expression Statements
Simple expressions used as statements:Arithmetic Expression Statements
Arithmetic operations used as statements:Comparison Expression Statements
Comparison operations used as statements:Logical Expression Statements
Logical operations used as statements:Function Call Expression Statements
Function calls used as statements:Object Property Expression Statements
Property access and modification as statements:Array/List Expression Statements
Array and list operations as statements:Conditional Expression Statements
Ternary and conditional expressions as statements:Complex Expression Statements
Multi-part expressions used as statements:Expression Statements in Control Flow
Expressions used within control structures:Side Effect Expression Statements
Expressions that produce side effects:Async Expression Statements
Asynchronous expressions as statements:Expression Statements with Error Handling
Expressions within try-catch blocks:Chain Expression Statements
Method chaining expressions:Expression Statements in Loops
Expressions used in loop contexts:Best Practices
- Keep expressions readable: Break complex expressions into simpler parts
- Use meaningful variable names: Make expression purpose clear
- Avoid side effects in comparisons: Keep comparisons pure
- Use parentheses for clarity: Group operations logically