bhawnamean
Version:
this is mean classes practices
46 lines (36 loc) • 674 B
JavaScript
function Employee()
{
this.arr =[
this.eno=101
this.enm="amit"
this.edes="trainer"
this.esal=10000,
this.eno=102
this.enm="aman"
this.edes="develpoer"
this.esal=20000,
this.eno=103
this.enm="ankit"
this.edes="engineer"
this.esal=30000,
this.eno=104
this.enm="ankur"
this.edes="scientist"
this.esal=40000,
this.eno=105
this.enm="amrit"
this.edes="HR"
this.esal=50000]
this.showEmployee=function()
{
for(i=0;i<arr.length;i++)
{
console.log("Eno:"+this.eno)
console.log("Enm:"+this.enm)
console.log("Esal:"+this.edes)
console.log("Edes:"+this.esal)
}
}
}
var obj = new Employee()
obj.showEmployee()