From d276b5e8568ffd7910d92a3ac7bbed051c1953f6 Mon Sep 17 00:00:00 2001 From: jsaasta Date: Tue, 17 Sep 2024 11:23:37 +0200 Subject: [PATCH] Delete wiki.md --- wiki.md | 87 --------------------------------------------------------- 1 file changed, 87 deletions(-) delete mode 100644 wiki.md diff --git a/wiki.md b/wiki.md deleted file mode 100644 index 805719a..0000000 --- a/wiki.md +++ /dev/null @@ -1,87 +0,0 @@ -# Examples - -## if-statement - - if(a < 0){ - // ... - } else if(a > 0) { - // ... - } else { - // ... - } - -## for-loop - - for(var i = 0; i < 10; i = i + 1){ - print i; - } - -## while-loop - - var a = 0; - while(a < 10){ - a = a + 1; - } - -## Functions & Callbacks - - function add(a, b) { - return a + b; - } - - function foo(bar){ - var a = 1; - var b = 2; - return bar(a, b); - } - - print add(4,5); // prints 9 - print foo(add); // prints 3 - - - - -# Classes and inheritance - - class FooParent { - - welcome(){ - print "Hello from Parent"; - } - } - - class Foo < FooParent { - - init(helloString){ - this.helloString = helloString; - } - - welcome(){ - super.welcome(); - print this.helloString; - } - } - - var hello = "Hello World!"; - var foo = Foo(hello); - foo.welcome(); - ---- - - class Person { - - init(name){ - this.name = name; - } - - whoAmI() { - return "This persons name is: " + this.name; - } - - } - var john = Person("John"); - john.age = 30; //Initialize new variables outside of class - - print john.whoAmI(); - - print john.age;