Skip to content

Commit

Permalink
Merge pull request #48 from karolstawowski/var-and-const
Browse files Browse the repository at this point in the history
Add variables and constants specification
  • Loading branch information
TodePond committed Feb 1, 2023
2 parents aba00d8 + 4337366 commit a989816
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,18 @@ name.push("k")!
name.push("e")!
```

## Naming
Both variables and constants can be named with any Unicode character or string.
```java
const const firstAlphabetLetter = 'A'!
var const 👍 = True!
var var 1️⃣ = 1!
```

This includes numbers, and other language constructs.
const const 5 = 4!
print(2 + 2 === 5)! //true

## Arrays
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`.
```java
Expand Down

0 comments on commit a989816

Please sign in to comment.