-
Notifications
You must be signed in to change notification settings - Fork 35
Language Feature
Jing Lu edited this page May 23, 2013
·
22 revisions
The following features supported by only ReoScript is non-compatible to ECMAScript/JavaScript standard.
This feature is planned to implement in v1.3
function A () {
this.a = 10;
}
function B : A () {
this.b = 20;
}
var b = new B;
console.log(b.a);
The output is:
10
var arr = [1, 5, 7, 8, 10, 13, 20, 24, 26];
var result = arr.where(n => n < 10).sum();
The result is:
21
-
setTimeout and setInterval supported to pass arguments
function check_alive(user) { if (...) { return 'ok'; } else { setTimeout(check_alive, 1000, user); } }
var user = getCurrentUser(); setTimeout(check_alive, 1000, user);
-
Binary literal supported (e.g. 0b1010)
var num = 0b1010; console.log(num);
The output is:
10