--- /dev/null
+
+function foo() {}
+foo.prototype = {}
+
+var f = new foo()
+print(foo.prototype)
+print(f.__proto__)
+print(foo.prototype == f.__proto__)
+print(f instanceof foo)
--- /dev/null
+
+function foo() {
+}
+
+print(foo.toString())
+print(foo.__proto__)
+print(foo.prototype)
+
+//foo.prototype.xx = function() {
+// print("got xx")
+//}
+
+//f = new foo
+//f.xx()
--- /dev/null
+
+var oo = {}
+function mk() {
+ function zoo() {
+ }
+ zoo.prototype = oo
+ return new zoo()
+}
+
+var a = mk()
+var b = mk()
+print(a.__proto__ == b.__proto__)
+
--- /dev/null
+
+function foo() {
+ this.stuff()
+}
+
+foo.prototype.stuff = function() {
+ print("this is cool stuff")
+}
+
+f = new foo()
--- /dev/null
+
+function test(a) {
+ switch (a) {
+ default: return "cool"
+ case "xxx": print("got zero"); break;
+ case "ciao": case "ciao2": return 123
+ case "hello": return 321
+ }
+ return 444
+}
+
+print(test("xxx"))
+print(test("hello"))
+print(test("ciao"))
+print(test("ciao2"))
+print(test(9))