File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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
Original file line number Diff line number Diff line change 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() `
Original file line number Diff line number Diff line change 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() `
Original file line number Diff line number Diff line change 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() `
Original file line number Diff line number Diff line change 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());
Original file line number Diff line number Diff line change 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) `
You can’t perform that action at this time.
0 commit comments