time-to-botec/squiggle/node_modules/@stdlib/utils/if-else/docs/repl.txt
NunoSempere b6addc7f05 feat: add the node modules
Necessary in order to clearly see the squiggle hotwiring.
2022-12-03 12:44:49 +00:00

31 lines
501 B
Plaintext

{{alias}}( bool, x, y )
If a condition is truthy, returns `x`; otherwise, returns `y`.
Parameters
----------
bool: boolean
Condition.
x: any
Value to return if a condition is truthy.
y: any
Value to return if a condition is falsy.
Returns
-------
z: any
Either `x` or `y`.
Examples
--------
> var z = {{alias}}( true, 1.0, -1.0 )
1.0
> z = {{alias}}( false, 1.0, -1.0 )
-1.0
See Also
--------