AI VOID
AI
PROJECTS
BLOG
MORE ▼
HOW IT WORKS
COMPARISONS
CHEATSHEETS
INTERVIEWS
NEWS
CUT THE CHASE
TUTORIALS
TROUBLESHOOTING
TAGS
CATEGORIES
▦
AI
PROJECTS
BLOG
HOW IT WORKS
COMPARISONS
CHEATSHEETS
INTERVIEWS
NEWS
CUT THE CHASE
TUTORIALS
TROUBLESHOOTING
TAGS
CATEGORIES
JavaScript Basics MCQ
Test your JavaScript knowledge with this interactive MCQ quiz.
Question 1
What is the correct way to declare a variable in JavaScript?
var myVar = 5;
v myVar = 5;
declare myVar = 5;
variable myVar = 5;
Question 2
What will be the output of console.log(typeof undefined)?
"undefined"
"null"
"object"
"string"
Question 3
Which method is used to add elements at the end of an array?
array.add()
array.push()
array.append()
array.insert()
Question 4
What is the result of '5' + 3 in JavaScript?
8
2
"53"
error
Question 5
Which keyword is used to define an async function?
async function myFunc() { }
function async myFunc() { }
async myFunc() { }
function myFunc() async { }
Submit Answers
Try Again
Your Results
Score:
0
/
0
(
0
%)