0
How should we use this and new keywords in javascript?
function Person(name,age,std){ this.studname=name; this.studage=age; this.studstd=std; } var student1 = new Person("alpha",20,5); var student2= new Person("Omega",21,10); document.write(student1.name+"is studying in"+student1.std+"but"+student2.name+"is good"); Is this right?
1 Resposta
0
I think the code is right, but I didn't understood the question 🤔