167). The four kinds of class members are ________

[A]Instance methods, Instance fields, Static method, Dynamic method
[B]Instance fields, Instance methods, Class fields, Class methods
[C]Instance fields, Non-instance fields, Dynamic methods, Global methods
[D] Global methods, Local methods, Dynamic methods, Static methods

Show Answer

168). Different kinds of the object involved in a class definition are ________

[A]Public object, Private object, Protected object
[B] Constructor object, Function object, Destructor object
[C]Constructor object, Prototype object, Instance object
[D]Instance method, Static object, Dynamic object

Show Answer

169). The object whose properties are inherited by all instances of the class, and properties whose values are functions behaving like instance methods of the class, is ________

[A] Instance object
[B]Constructor object
[C]Destructor object
[D]Prototype object

Show Answer

170). Which variables are used internally in object methods and are also globally visible?

[A]Object properties
[B]Variable properties
[C]Method properties
[D]Internal properties

Show Answer

171). The class that represents the regular expressions is ________

[A]RegExpObj
[B]RegExpClass
[C]RegExp
[D]StringExp

Show Answer

172). The different variant of Date() constructor to create date object is/are ___________ i. new Date(date) ii. new Date(milliseconds) iii. new Date(date string) iv. new Date(year, month, date[hour, minute, second, millisecond])

[A]i, ii and iii only
[B]ii, iii and iv only
[C]i, ii and iv only
[D]i, ii, iii and iv

Show Answer

173). Which is the correct code that returns a complex number that is the complex conjugate of this one?

[A]Complex.prototype.conj = function() { return new Complex(this.r, -this.i); };
[B]Complex.prototype.conj = function() { return Complex(this.r, -this.i); };
[C]Complex.prototype.conj = function() { return (this.r, -this.i); };
[D]Complex.prototype.conj = function() { new Complex(this.r, -this.i); };

Show Answer

174). How can we make methods available on all objects?

[A]Object.add(methods)
[B]Object.methods(add)
[C]Object.add.methods(…)
[D] Object.prototype

Show Answer

175). What is the procedure to add methods to HTMLElement so that they will be inherited by the objects that represent the HTML tags in the current document?

[A]HTMLElement.prototype(…)
[B]HTMLElement.prototype
[C] HTML.addmethods()
[D] HTML.elements(add)

Show Answer

176). You can refresh the webpage in JavaScript by using ________

[A]window.reload
[B]location.reload
[C]window.refresh
[D]page.refresh

Show Answer

177). What will be the output of the following JavaScript code?
   emp={id:102,name:"Shyam Kumar",salary:40000}  
   document.write(emp.id+" "+emp.name+" "+emp.salary);

[A]102 4000 Shyam Kumar
[B]102 4000
[C] 102 Shyam Kumar 40000
[D]102 shyam kumar 40000

Show Answer

178). What will be the output of the following JavaScript code?
function emp(id,name)
{  
    this.id=id;  
    this.name=name;    
}  
e=new emp(103,"Vimal Jaiswal");  
 
document.write(e.id+" "+e.name");

[A]103 vimal jaiswal
[B]103
[C]103 Vimal Jaiswal
[D]Vimal jaiswal

Show Answer

179). What will be the output of the following JavaScript code?
var emp=new Object();  
emp.name="Ravi Malik";  
emp.salary=50000;  
document.write("emp.name+" "+emp.salary);

[A]Ravi malik 5000
[B]Ravi Malik 50000
[C]Ravi malik
[D]50000

Show Answer

180). What will be the output of the following JavaScript code?
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);

[A]Rahul 30000
[B]Rahul
[C]Rahul 45000
[D]45000

Show Answer

181). What will be the output of the following JavaScript code?
const obj = { 10: 'arry', 21: 'barry', 23: 'carry' };  
console.log(Object.entries(obj)[2]);

[A][“arry”, “10”]
[B] [“10”,”arry”]
[C][“21”,barry”]
[D] [“23”,”carry”]

Show Answer