Espruino/tests/test_new_nested.js
2016-10-13 10:20:16 +01: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;