Literals
Strings
"Hello, World!"
'Hello, World!'
"2 + 2 = #{2+2}"
'10 + 10 = #{10+10}'Numbers
123
123.456
123_456
0b123Arrays
Booleans
Last updated
Was this helpful?
The most fundamental of any language are its literals. Cheddar provides the 4 most basic literals:
Strings
Numbers
Booleans
Arrays
Additionally Cheddar has functions, interfaces, and more primitives. Classes will be covered in their very own section
Strings in Cheddar are like most programming languages:
"Hello, World!"
'Hello, World!'
"2 + 2 = #{2+2}"
'10 + 10 = #{10+10}'Numbers have many features in Cheddar to make them readable and clear:
123
123.456
123_456
0b123Arrays in Cheddar are like most other languages:
Booleans are either:
Last updated
Was this helpful?
Was this helpful?
[1,2,3]
["foo", "bar", "baz"] true
false