Skip to content

Commit afd274f

Browse files
committed
tweaks
1 parent 9b146eb commit afd274f

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

README.md

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ const const const pi = 3.14!
9494
Both variables and constants can be named with any Unicode character or string.
9595

9696
```java
97-
const const firstAlphabetLetter = 'A'!
97+
const const letter = 'A'!
9898
var const 👍 = True!
9999
var var 1️⃣ = 1!
100100
```
@@ -177,8 +177,8 @@ Booleans can be `true`, `false` or `maybe`.
177177

178178
```java
179179
const var keys = {}!
180-
addEventListener("keydown", e => keys[e.key] = true)!
181-
addEventListener("keyup", e => keys[e.key] = false)!
180+
addEventListener("keydown", (e) => keys[e.key] = true)!
181+
addEventListener("keyup", (e) => keys[e.key] = false)!
182182

183183
function isKeyDown(key) => {
184184
if (keys[key] = undefined) {
@@ -331,7 +331,8 @@ The symbol for the Cape Verdean escudo is placed in the decimal separator positi
331331
Developers from the Republic of Cape Verde can benefit from this syntax:
332332

333333
```java
334-
addEventListener("keydown", e => print(`You've pressed: {e$code}`))!
334+
const const player = { name: "Lu" }!
335+
print("Hello {player$name}!")!
335336
```
336337

337338
## Types
@@ -391,7 +392,7 @@ Similarly, the `next` keyword lets you see into the future!
391392

392393
```java
393394
const var score = 5!
394-
after ("click") score++!
395+
addEventListener("click", () => score++)!
395396
print(await next score)! //6 (when you click)
396397
```
397398

@@ -639,7 +640,7 @@ const const g_fScore = 4.5!
639640
In most languages, it's hard to get asynchronous functions to synchronise with each other. In DreamBerd, it's easy: Asynchronous functions take turns running lines of code.
640641

641642
```java
642-
async funct count() {
643+
async funct count() => {
643644
print(1)!
644645
print(3)!
645646
}
@@ -651,7 +652,7 @@ print(2)!
651652
You can use the `noop` keyword to wait for longer before taking your turn.
652653

653654
```java
654-
async func count() {
655+
async func count() => {
655656
print(1)!
656657
noop!
657658
print(4)!

0 commit comments

Comments
 (0)