mirror of
https://github.com/espruino/Espruino.git
synced 2025-12-08 19:06:15 +00:00
14 lines
144 B
JavaScript
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;
|
|
|