fork download
  1. process.stdin.resume();
  2. process.stdin.setEncoding('utf8');
  3.  
  4. Test = function () {
  5. var a = 42;
  6.  
  7. this.get = function () { console.log(a); }
  8. Test.prototype = {
  9. testThing: function () { console.log('Test thing'); }
  10. };
  11. };
  12.  
  13. Test.prototype.foo = function () { console.log('foo')' }
  14.  
  15.  
  16.  
  17. var t = new Test();
  18. t.get();
  19. t.foo();
Runtime error #stdin #stdout #stderr 0.05s 31048KB
stdin
Standard input is empty
stdout
Standard output is empty
stderr
/home/3NE7HH/prog.js:13
Test.prototype.foo = function () { console.log('foo')' }
                                                     ^^^
SyntaxError: Unexpected token ILLEGAL
    at Module._compile (module.js:437:25)
    at Object.Module._extensions..js (module.js:467:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Module.runMain (module.js:492:10)
    at process.startup.processNextTick.process._tickCallback (node.js:244:9)