JS Objects

OOJS

by manoj_antony32

JavaScript

var x = function(j){
  this.i = 0;
  this.j = j;
}

x.prototype.sum = function(){
  return this.j;
}

var x1 = new x('Hello World')

console.dir(x1)