In CoyoteScript you can execute mathematical operations. Mathematical operations, combined with variables, are the foundation for creating dynamic code that can handle a whole range of scenarios or process a whole range of values all within a few lines of script.
CoyoteScripts hosts most, if not all mathematical operators that you may be familiar with. These include:
- “+” or “add” for addition.
- “-” or “remove” for subtraction.
- “*” for multiplication.
- “/” for division.
Parenthesis can be used to control the order of the mathematical operations.
Examples:
- “(7 + 3) * 5 / (5 + 5)” would calculate to “5”.
- “$a – 5 * 3” where $a = 5 would calculate to “-10”