Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conditional Expressions #2

Open
ramyaragupathy opened this issue Feb 28, 2018 · 1 comment
Open

Conditional Expressions #2

ramyaragupathy opened this issue Feb 28, 2018 · 1 comment
Labels

Comments

@ramyaragupathy
Copy link
Owner

Conditional expressions are of the form:
(if test-exp then-exp)
(if test-exp then-exp else-exp)

The test-exp is a boolean expression while the then-exp and else-exp are expressions. If the value of the test-exp is true then the then-exp is returned else the else-exp is returned.

@ramyaragupathy
Copy link
Owner Author

Input Output Comments
if (< 5 4) "true" "false" false
if (> 5 4) "true" "false" true
if (< 5 4) "true" null
if (> 5 4) "true" t ✖️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant