bhawnamean
Version:
this is mean classes practices
35 lines (21 loc) • 323 B
JavaScript
function Employee()
{
this.getdata=function()
{
this.a=5
this.b=6
this.c
}
this.adddata=function()
{
this.c=this.a+this.b
}
this.showdata=function()
{
console.log("addition:"+this.c)
}
}
var obj = new Employee()
obj.getdata()
obj.adddata()
obj.showdata()