Answer: Instance fields, Instance methods, Class fields, Class methods
Answer: Instance fields, Instance methods, Class fields, Class methods
Answer: Constructor object, Prototype object, Instance object
Article and Schedule Quiz | Start Test! |
Answer: Prototype object
Answer: Variable properties
i. new Date(date)
ii. new Date(milliseconds)
iii. new Date(date string)
iv. new Date(year, month, date[hour, minute, second, millisecond])
Answer: ii, iii and iv only
Answer: Complex.prototype.conj = function() { return new Complex(this.r, -this.i); };
Answer: HTMLElement.prototype
emp={id:102,name:"Shyam Kumar",salary:40000} document.write(emp.id+" "+emp.name+" "+emp.salary);
Answer: 102 4000
function emp(id,name) { this.id=id; this.name=name; } e=new emp(103,"Vimal Jaiswal"); document.write(e.id+" "+e.name");
Answer: 103 Vimal Jaiswal
var emp=new Object(); emp.name="Ravi Malik"; emp.salary=50000; document.write("emp.name+" "+emp.salary);
Answer: Ravi Malik 50000
function emp(name,salary) { this.name=name; this.salary=salary; this.changeSalary=changeSalary; function changeSalary(otherSalary) { this.salary=otherSalary; } } e=new emp("Rahul",30000); e.changeSalary(45000); document.write("e.name+" "+e.salary);
Answer: Rahul 45000
const obj = { 10: 'arry', 21: 'barry', 23: 'carry' }; console.log(Object.entries(obj)[2]);
Answer: [“23”,”carry”]