Font size
WorksheetsJS-QUIZ
Total questions: 25
Worksheet time: 18mins
Which keyword is used to declare a variable in JavaScript?
var
let
const
All of the above
What does typeof null return?
null
object
undefined
string
Which method is used to convert a string into an array?
arrayify()
slice()
join()
split()
How do you write a single-line comment in JavaScript?
// comment
<!-- comment -->
/* comment */
# comment
What will 2 + "2" evaluate to in JavaScript?
4
22
undefined
NaN
Which function is used to parse a string into an integer?
parseInt()
parseFloat()
Number()
toInt()
What does NaN stand for?
No Argument Needed
Not a Number
Number at Null
Non-Accessible Node
Which loop always executes at least once?
for
while
do...while
None
What is the output of console.log(0.1 + 0.2 === 0.3)?
true
false
undefined
NaN
What is the correct way to declare a function in JavaScript?
function myFunc() {}
def myFunc() {}
let myFunc = {}
create function myFunc() {}
How can you check if a variable is an array?
isArray(variable)
Array.check(variable)
Array.isArray(variable)
typeof variable === "array"
Which operator is used to compare both value and type?
=
==
===
!=
What will console.log("5" - 3) output?
a) 2
b) 53
c) NaN
d) undefined
Which method adds an element to the end of an array?
push()
pop()
shift()
unshift()
What is the result of console.log(typeof undefined)?
a) null
b) object
c) undefined
d) string
How do you declare a constant in JavaScript?
let
const
var
define
Which method is used to convert JSON to a JavaScript object?
JSON.parse()
JSON.stringify()
JSON.convert()
JSON.objectify()
What will be the output of the following code?
let x; console.log(x);
null
undefined
Error
0
Which of the following is NOT a primitive data type in JavaScript?
string
number
object
boolean
How do you write an arrow function in JavaScript?
let myFunc = => () {}
let myFunc = function => {}
let myFunc = () => {}
let myFunc => () {}
console.log("🎉".repeat(3));
🎉🎉🎉
Error
🎉3
undefined
Write a function called addNumbers that takes two parameters and returns their sum
How much do you enjoy working with JavaScript?
🎉 I love it! The possibilities are endless!
🤔 It's okay, but sometimes it drives me crazy.
😓 I struggle with it, but I’m learning.
💤 Not my favorite, but I manage.
Where do you currently find yourself in terms of JavaScript proficiency?
🚀 Advanced – I can build complex projects and solve tricky problems with ease!
🌱 Just Starting – I’ve just begun my journey with JavaScript and am exploring the language.
📚 Beginner – I’m still learning the basics and practicing simple tasks.
🔧 Intermediate – I understand the fundamentals well and can build small to medium-sized projects.
Draw a shape you like! : ) just 4 fun

