Skip to content

Commit a989816

Browse files
authored
Merge pull request #48 from karolstawowski/var-and-const
Add variables and constants specification
2 parents aba00d8 + 4337366 commit a989816

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

‎README.md‎

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,18 @@ name.push("k")!
5454
name.push("e")!
5555
```
5656

57+
## Naming
58+
Both variables and constants can be named with any Unicode character or string.
59+
```java
60+
const const firstAlphabetLetter = 'A'!
61+
var const 👍 = True!
62+
var var 1️⃣ = 1!
63+
```
64+
65+
This includes numbers, and other language constructs.
66+
const const 5 = 4!
67+
print(2 + 2 === 5)! //true
68+
5769
## Arrays
5870
Some languages start arrays at `0`, which can be unintuitive for beginners. Some languages start arrays at `1`, which isn't representative of how the code actually works. DreamBerd does the best of both worlds: Arrays start at `-1`.
5971
```java

0 commit comments

Comments
 (0)