JavaScript Test

JavaScript Test

50 Qs

quiz-placeholder

Similar activities

JavaScript Basics: Introduction to Arrays

JavaScript Basics: Introduction to Arrays

9th Grade

50 Qs

Assessment - Unit 1 Review

Assessment - Unit 1 Review

9th - 12th Grade

45 Qs

PF201: SCCPF2012223

PF201: SCCPF2012223

University

50 Qs

Sec-E HTML DOM

Sec-E HTML DOM

University

54 Qs

ICT CBP Q3 Periodical Test

ICT CBP Q3 Periodical Test

9th Grade - University

52 Qs

coding advanced 3-4

coding advanced 3-4

9th - 12th Grade

50 Qs

JavaScript Q3 Exam

JavaScript Q3 Exam

9th Grade

52 Qs

ELECTIVE 1

ELECTIVE 1

University

50 Qs

JavaScript Test

JavaScript Test

Assessment

Quiz

Computers

Easy

Created by

Kushal Das

Used 7+ times

FREE Resource

50 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

20 sec • 2 pts

What is an arrow function in JavaScript?

A method for sorting arrays in JavaScript

A concise way to write functions using '=>' syntax.

A way to draw shapes in JavaScript

A type of data structure in JavaScript

2.

MULTIPLE CHOICE QUESTION

20 sec • 2 pts

How do you declare a multidimensional array in JavaScript?

const multiArray = [[1, 2], [3, 4], [5, 6]];

var multiArray = [[1, 2], [3, 4], [5, 6]];

let multiArray = [[1, 2], [3, 4], [5, 6]]

let multiArray = [[1, 2], [3, 4], [5, 6]];

3.

MULTIPLE CHOICE QUESTION

20 sec • 2 pts

Explain the syntax of a for loop in JavaScript.

for(init; cond; iter) { // code block }

for(initialization; condition; iteration) { // code block to be executed }

for(init; cond; iter) { code block }

for(init; cond; iter) // code block

4.

MULTIPLE CHOICE QUESTION

20 sec • 2 pts

When would you use a switch case statement in JavaScript?

When you need to handle only one condition

When you want to execute the same block of code for all conditions

When you want to execute asynchronous code

When you have multiple conditions to evaluate and want to execute different blocks of code based on each condition.

5.

MULTIPLE CHOICE QUESTION

20 sec • 2 pts

What are the different data types in JavaScript?

integer

undefined, null, boolean, number, string, object, symbol

array

float

6.

MULTIPLE CHOICE QUESTION

20 sec • 2 pts

How can you perform mathematical operations in JavaScript?

You can perform mathematical operations in JavaScript using string concatenation.

You can perform mathematical operations in JavaScript using logical operators.

You can perform mathematical operations in JavaScript using arithmetic operators.

You can perform mathematical operations in JavaScript using comparison operators.

7.

MULTIPLE CHOICE QUESTION

20 sec • 2 pts

Define a function in JavaScript.

def functionName(parameters) { // code block }

function functionName(parameters) { // code block }

functionName(parameters) { // code block }

function functionName(parameters) { // code block

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?