fork download
  1. process.stdin.resume();
  2. process.stdin.setEncoding('utf8');
  3.  
  4. var Test = function(x, y) {
  5. this.x = x;
  6. this.y = y;
  7. };
  8. Test.prototype.testuj = function() {
  9. console.log(this.x);
  10. };
  11.  
  12. var otherT = { x: 100, y: 20 };
  13. otherT.__proto__ = Test.prototype;
  14.  
  15. otherT.testuj();
Success #stdin #stdout 0.06s 45776KB
stdin
Standard input is empty
stdout
100