Add ifThenElse

Since if-then-else constructs are not an expression in JavaScript,
it needs to be added as function.
Add a simple repl