JavaScript Basics Quiz

JavaScript Basics Quiz

Professional Development

15 Qs

quiz-placeholder

Similar activities

Mega Quizz 🎁

Mega Quizz 🎁

Professional Development

18 Qs

JavaScript Pass by value, Pass by Reference, Scope Hoisting

JavaScript Pass by value, Pass by Reference, Scope Hoisting

Professional Development

15 Qs

Js 03.02

Js 03.02

Professional Development

20 Qs

JavaScript Quiz

JavaScript Quiz

Professional Development

20 Qs

Python

Python

KG - Professional Development

13 Qs

Javascript Básico

Javascript Básico

Professional Development

16 Qs

coding contest

coding contest

Professional Development

10 Qs

Basics of JavaScript

Basics of JavaScript

11th Grade - Professional Development

15 Qs

JavaScript Basics Quiz

JavaScript Basics Quiz

Assessment

Quiz

Computers

Professional Development

Hard

Created by

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

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?