Espruino/tests/test_member_constructor.js
2013-10-03 22:54:47 +02:00

4 lines
171 B
JavaScript

// Test that object member functions can be used as constructors
var hw = { setup_function : function() { this.hw_foo = 1; } };
result = (new hw.setup_function()).hw_foo;