☰
Home
Tutorials
Videos
Q&A
MCQ
Shortcuts
Exercises
Appointment
Login
JavaScript Tutorial
Introduction
History
Development Environment
Script Tag
Syntax
Popup Boxes
Comments
Variables
Operators
Data Types
Strings
Numbers
Booleans
Objects
Date Object
Arrays
Array Methods
Functions
If Else
Switch
For Loop
While Loop
Scope
Eval
Error Handling
Classes
This Keyword
New Keyword
Inheritance
Final Quiz
JavaScript Final Quiz
Test your JavaScript knowledge. Select the correct answer and click Submit Quiz.
Q1.
JavaScript was created by?
Brendan Eich
Dennis Ritchie
James Gosling
Bjarne Stroustrup
Q2.
What was the first name of javascript
Mocha
typescript
livescript
none of these
Q3.
Which keyword declares a variable?
var
int
string
define
Q4.
Which operator is used for assignment?
=
==
===
!=
Q5.
Which data type stores true or false?
Boolean
String
Number
Array
Q6.
Which method displays output in browser popup?
alert()
print()
echo()
show()
Q7.
Which object stores multiple values?
Array
String
Number
Boolean
Q8.
Which keyword creates a function?
function
method
func
define
Q9.
Which statement is used for decision making?
if
for
while
switch
Q10.
Which loop executes a block repeatedly?
for
if
break
continue
Q11.
JavaScript is a ______ language.
Scripting
Markup
Database
Query
Q12.
Which object represents date and time?
Date
Time
Clock
Calendar
Q13.
Which method joins array elements?
join()
concat()
push()
pop()
Q14.
Which method adds element at end of array?
push()
shift()
pop()
slice()
Q15.
Which keyword stops loop execution?
break
stop
exit
return
Q16.
Which keyword skips current iteration?
continue
skip
next
pass
Q17.
What is the output type of typeof 'Hello'?
string
text
char
word
Q18.
Which symbol is used for strict equality?
===
==
=
!=
Q19.
Which keyword refers to current object?
this
self
current
object
Q20.
Which method sets custom value of this?
call()
join()
push()
forEach()
Q21.
Which method is similar to call()?
apply()
slice()
sort()
bind()
Q22.
Which method permanently binds this?
bind()
call()
apply()
join()
Q23.
Objects are created using which keyword?
new
create
object
class
Q24.
Prototype is mainly used for?
Inheritance
Looping
Conditions
Variables
Q25.
JavaScript inheritance is based on?
Prototype
Class
Package
Namespace
Q26.
Which method creates an object with specified prototype?
Object.create()
Object.new()
create()
newObject()
Q27.
Which function converts string to integer?
parseInt()
toString()
Number()
parseFloat()
Q28.
Which method removes last array element?
pop()
push()
shift()
join()
Q29.
Which event occurs when button is clicked?
onclick
onload
onchange
onfocus
Q30.
JavaScript file extension is?
.js
.java
.jsx
.json
Submit Quiz