Docs / Language Manual / Overview

Overview

FeatureExampleJavaScript Output
String"Hello""Hello"
Character'x'"x"
Integer23, -2323, -23
Float23.0, -23.023.0, -23.0
Integer Addition23 + 123 + 1
Float Addition23.0 +. 1.023.0 + 1.0
Integer Division/Multiplication2 / 23 * 12 / 23 * 1
Float Division/Multiplication2.0 /. 23.0 *. 1.02.0 / 23.0 * 1.0
Float Exponentiation2.0 ** 3.0Math.pow(3, 4)
String Concatenation"Hello " ++ "World""Hello " + "World"
Comparison>, <, >=, <=>, <, >=, <=
Boolean operation!, &&, ||!, &&, ||
Shallow and deep Equality===, =====, ==
List[1, 2, 3][1, [2, [3, 0]]]
List Prepend[a1, a2, ...theRest][a1, [a2, theRest]]
Array[|1, 2, 3|][1, 2, 3]
Recordtype t = {b: int}; let a = {b: 10}var a = {b: 10}
Multiline Comment/* Comment here */Not in output
Single line Comment// Comment hereNot in output