fork download
  1.  
  2. var builder = function ( klass, parameters ) {
  3. var o = Object.create( klass.prototype );
  4. klass.apply( o, parameters );
  5. return o;
  6. };
  7.  
  8. // Show time
  9.  
  10. var Foo = function ( n ) {
  11. this.n = n;
  12. };
  13.  
  14. Foo.prototype.show = function ( ) {
  15. print( this.n );
  16. };
  17.  
  18. var instance = builder( Foo, [ 42 ] );
  19. instance.show( );
  20.  
Runtime error #stdin #stdout 0.3s 213120KB
stdin
Standard input is empty
stdout
Standard output is empty