
JavaScript Basics Quiz

Quiz
•
Computers
•
Professional Development
•
Hard
Anas Muhammed
FREE Resource
15 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the purpose of the 'let' keyword in JavaScript?
To declare a variable that is block scoped
To declare a variable that is globally scoped
To declare a constant variable
To declare a variable that can be re-assigned
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is NOT a primitive data type in JavaScript?
String
Object
Number
Boolean
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What does the 'return' statement do in a function?
Invokes another function
Declares a variable
Returns a value to the caller
Ends the function execution
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the result of the expression '2 + '7' in JavaScript?
27
Undefined
9
Error
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following statements is true about the 'this' keyword?
It always refers to the global object
It is always undefined
It refers to the object that is currently executing the function
It cannot be used in arrow functions
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is a promise in JavaScript?
A way to handle synchronous tasks
A method to create variables
An object that represents the eventual completion of an asynchronous operation
A function that returns a value immediately
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is a method to create a new element in the DOM?
document.getElementById()
document.removeChild()
document.createElement()
document.querySelector()
Create a free account and access millions of resources
Similar Resources on Wayground
20 questions
JS - Practice 1

Quiz
•
Professional Development
10 questions
FE Batch 20 (Javascript Fundamental)

Quiz
•
Professional Development
17 questions
Quiz 1- Desenvolvimento Java

Quiz
•
Professional Development
15 questions
BINAR Synergy 6 | Chapter 4

Quiz
•
Professional Development
10 questions
Advanced JS

Quiz
•
Professional Development
15 questions
JavaScript

Quiz
•
Professional Development
11 questions
Java Fundamentals

Quiz
•
Professional Development
20 questions
Révision HTML, CSS et JavaScript

Quiz
•
Professional Development
Popular Resources on Wayground
10 questions
Video Games

Quiz
•
6th - 12th Grade
20 questions
Brand Labels

Quiz
•
5th - 12th Grade
15 questions
Core 4 of Customer Service - Student Edition

Quiz
•
6th - 8th Grade
15 questions
What is Bullying?- Bullying Lesson Series 6-12

Lesson
•
11th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
22 questions
Adding Integers

Quiz
•
6th Grade
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade