
JavaScript Concepts and Runtime Quiz
Authored by Techtorial Academy
Information Technology (IT)
Professional Development
Used 1+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
20 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What keyword is used to define a class in JavaScript?
class
function
object
prototype
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the purpose of the constructor method in a class?
To define static methods
To initialize instance variables
To create global variables
To execute asynchronous tasks
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which keyword refers to the specific object being built in a class?
this
object
instance
self
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the default value of the 'role' parameter in the User class constructor?
admin
user
guest
viewer
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What does the term 'synchronous' mean in JavaScript?
Execute tasks in sequence
Execute tasks in parallel
Execute tasks asynchronously
Execute tasks randomly
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the purpose of the 'setTimeout' function?
To execute code synchronously
To execute code after a delay
To execute code immediately
To execute code in parallel
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is a 'Promise' in JavaScript?
A function that executes immediately
A variable that holds a value
A placeholder for a future result
A method to handle synchronous tasks
Access all questions and much more by creating a free account
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?