Skip to content

Commit 165c143

Browse files
committed
more tour work
1 parent 95d2c0c commit 165c143

6 files changed

Lines changed: 42 additions & 9 deletions

File tree

web/src/app.css

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,20 +19,20 @@ body {
1919
margin-bottom: 0 !important;
2020
}
2121

22-
.docs code {
22+
code {
2323
font-size: 1rem !important;
2424
font-weight: normal !important;
25+
font-family: monospace;
2526
}
2627

27-
.docs code:not(pre code) {
28+
code:not(pre code) {
2829
padding: 0.1em 0.5em !important;
2930
border-radius: 0.25rem !important;
3031
@apply bg-bg0_h
31-
3232
}
3333

34-
.code:not(pre code)::before,
35-
.docs code:not(pre code)::after {
34+
code:not(pre code)::before,
35+
code:not(pre code)::after {
3636
content: "" !important;
3737
}
3838

web/src/lib/tour/pages/arrays.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
## Arrays
2-
In modu strings have the following builtins
2+
In modu strings have the following methods:
33
- `<array>.len()`
44
- `<array>.push(value)`
55
- `<array>.pop()`

web/src/lib/tour/pages/floats.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
## Floats
2-
In modu, floats are f64 numbers, and they come with the following built in functions:
2+
In modu, floats are f64 numbers, and they come with the following methods:
33
- `<float>.max(b)`
44
- `<float>.min(b)`
55
- `<float>.abs()`

web/src/lib/tour/pages/integers.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
## Integers
2-
In modu, integers are i64 numbers, and they come with the following built in functions:
2+
In modu, integers are i64 numbers, and they come with the following methods:
33
- `<int>.max(b)`
44
- `<int>.min(b)`
55
- `<int>.abs()`

web/src/lib/tour/pages/objects.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
## Objects
2+
In modu objects are created with `let obj = { ... }` and have the following methods:
3+
- `<object>.get(key)`
4+
- `<object>.set(key, value)`
5+
- `<object>.has(key)`
6+
- `<object>.delete(key)`
7+
- `<object>.stringify()`
8+
- `<object>.keys()`
9+
- `<object>.values()`
10+
11+
[CODE]
12+
let obj = { "value": "test" };
13+
print(obj);
14+
15+
// reassign "value"
16+
obj.value = "potato";
17+
print(obj.get("value"));
18+
19+
// set a value on the object
20+
obj.set("test", true);
21+
// could also be done with: obj.test = true;
22+
23+
// check if an object has a key
24+
print(obj.has("no")); // false
25+
26+
// deletes a entry from the object
27+
print(obj.delete("value"));
28+
29+
// prints all keys in the object
30+
print(obj.keys());
31+
32+
// prints all values in the object
33+
print(obj.values());

web/src/lib/tour/pages/strings.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
## Strings
2-
In modu strings have the following builtins
2+
In modu strings have the following methods:
33
- `<string>.len()`
44
- `<string>.split(delimiter)`
55
- `<string>.replace(old, new)`

0 commit comments

Comments
 (0)