Espruino/tests/test_new_nested.js
2017-02-16 17:23:41 +13:00

14 lines
144 B
JavaScript

// test for nested constructors
function A(x) {
this.a = x;
}
function B() {
this.b = 42;
}
var r = new A(new B());
result = r.a.b == 42;