OOP Quiz

OOP Quiz

Professional Development

5 Qs

quiz-placeholder

Similar activities

Java Interfaces Quiz

Java Interfaces Quiz

Professional Development

10 Qs

S1_Java Theory_31.8.2021

S1_Java Theory_31.8.2021

Professional Development

5 Qs

ST KKEM QUIZ SELENIUM PART!

ST KKEM QUIZ SELENIUM PART!

Professional Development

10 Qs

Terraform101

Terraform101

Professional Development

10 Qs

AWS Services Intro

AWS Services Intro

Professional Development

6 Qs

Java Encapsulation Quiz

Java Encapsulation Quiz

Professional Development

10 Qs

CPP test2

CPP test2

Professional Development

10 Qs

OOP Quiz

OOP Quiz

Assessment

Quiz

Computers

Professional Development

Medium

Created by

Re:Coded Org

Used 2+ times

FREE Resource

5 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following are benefits of Object Oriented Programming (OOP) in JavaScript?

Reusability of code

Better code organization

Encapsulation

All of the above

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which statement is true about constructors in OOP?

Constructors are used to initialize instances of a class.

Constructors can only be used to create one instance of a class.

In JS, A class can have multiple constructors.

All options are correct

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the value of the "this" keyword inside a constructor function in JavaScript?

It refers to the global class

It refers to the instance of the class being created

It refers to the parent object of the constructor function

It is undefined inside a constructor function

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How do you create a new method in a JavaScript class?

By defining a new function inside the class definition

By using the "this" keyword to define a new property on the class

By using the "new" keyword to create a new instance of the class

By extending the class with a new subclass.

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is used in JavaScript to create an instance of a class?

create

new

object

this