Skip to content

Commit

Permalink
add more examples to readme
Browse files Browse the repository at this point in the history
  • Loading branch information
batt0s committed Oct 6, 2024
1 parent 0e4b3e5 commit 133df97
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,27 @@ def arr_of_nums = [1, 2, 3];
def boolean_variable = true;
```

Define functions and use call expression.

```
def factorial = func(x) { if (x == 0) { 1 } else { x * factorial(x - 1) } };
factorial(4);
```

Use index expression.

```
def arr = [1, 2, 3];
arr[0];
```

Use hashmap.

```
def mymap = {"name": "Rizzler", "version": 1};
mymap["name"];
```

#### Built-in Functions

##### `puts` and `rizz`
Expand Down

0 comments on commit 133df97

Please sign in to comment.