Javascript Classes MCQ

Computer Science and Engineering > JavaScript MCQ

Test your knowledge of JavaScript classes with our MCQ quizzes. Our website features questions on topics such as class syntax, inheritance, and method overrides, as well as how to use classes to create objects and organize code in a JavaScript application. Whether you're a beginner looking to learn about classes or an experienced developer looking to brush up on your skills, our quizzes provide a fun and effective way to learn. Try one today and see how much you know about this important programming concept. ➲ Javascript Classes MCQ - Quiz


  • A Classes
  • B Method
  • C Interface
  • D Classes & terface
  • A from
  • B to
  • C this
  • D object
  • A false
  • B true
  • C 0
  • D 1
  • A There is no difference
  • B Functions are considered as fields
  • C Variables are specific
  • D Functions are values, and there is no hard distinction between methods and fields
  • A objects inherit prototype properties even in a dynamic state
  • B objects inherit prototype properties only in a dynamic state
  • C objects inherit prototype properties in the static state
  • D object doesn
  • A It can be invoked manually as object.JSON()
  • B It will be automatically invoked by the compiler
  • C It is invoked automatically by the JSON.stringify() method
  • D It cannot be invoked in any form
  • A A is the superclass and B is the subclass
  • B B is the superclass and A is the subclass
  • C Both A and B are the superclass
  • D Both A and B are the subclass
  • A B=inherit(A);
  • B B=A.inherit();
  • C B.prototype=inherit(A);
  • D B.prototype=inherit(A.prototype);
  • A var t=new FilteredSet(s, {function(s) {return !(x instanceof Set);});
  • B var t=new FilteredSet{function(s) {return !(x instanceof Set);});
  • C var t=new FilteredSet(s, {function(s) {return (x instanceof Set);});
  • D var t=new FilteredSet(s, {function(s) {return x;});
  • A Object.defineProperty()
  • B Object.defineProperties()
  • C Both Object.defineProperty() and Object.defineProperties()
  • D Object.inherit()
  • A 7,1
  • B 18,1
  • C Undefined
  • D Error
  • A undefined
  • B runtime error
  • C compilation error
  • D rahul
  • A 0
  • B 10
  • C undefined
  • D Error
  • A true
  • B false
  • C 0
  • D error
  • A 2
  • B 4
  • C undefined
  • D error
  • 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
  • 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
  • A Instance object
  • B Constructor object
  • C Destructor object
  • D Prototype object
  • A Object properties
  • B Variable properties
  • C Method properties
  • D Internal properties
  • A RegExpObj
  • B RegExpClass
  • C RegExp
  • D StringExp
  • 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); };
  • A Object.methods(add)
  • B Object.add(methods)
  • C Object.add.methods(
  • D Object.prototype
  • A HTMLElement.prototype(
  • B HTMLElement.prototype
  • C HTML.addmethods()
  • D HTML.elements(add)
  • A window.reload
  • B location.reload
  • C window.refresh
  • D page.refresh
  • A 103 vimal jaiswal
  • B 103
  • C 103 Vimal Jaiswal
  • D Vimal jaiswal
  • A Rahul 30000
  • B Rahul
  • C Rahul 45000
  • D v
  • A [
  • B [
  • C [
  • D [
  • A declaring and loading modules
  • B declaring functions
  • C declaring modules
  • D loading modules
  • A 2
  • B 3
  • C 1
  • D 4
  • A sets = sets.AbstractEnumerableSet.extend();
  • B sets.SingletonSet = sets.AbstractEnumerableSet.extend(
  • C sets.SingletonSet = sets.extend(
  • D sets = sets.extend(
  • A Predefined function
  • B Module function
  • C Public function
  • D Private function
  • A Assign itself to a global variable
  • B Invoke another module of the same kind
  • C Return a namespace object
  • D Invoke another module of the same kind