Mastering JavaScript Basics

Quiz
•
Computers
•
University
•
Medium
MOzY MOzY
Used 2+ times
FREE Resource
16 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What method would you use to create a new array with elements that pass a test?
Use the 'map' method.
Use the 'filter' method.
Use the 'forEach' method.
Use the 'reduce' method.
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How do you combine all elements of an array into a single value?
Use array.concat() to merge arrays.
Use array.reduce() in JavaScript or a similar folding function in other languages.
Utilize array.filter() to select specific items.
Apply array.map() to transform elements.
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the purpose of the rest parameter in a function?
The rest parameter is used to define default values for function parameters.
The purpose of the rest parameter is to collect all remaining arguments into an array.
The rest parameter limits the number of arguments a function can accept.
The rest parameter is a way to create named parameters in a function.
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How does the spread operator work in JavaScript?
The spread operator combines multiple objects into one.
The spread operator is used to create a new array from an existing one.
The spread operator in JavaScript expands elements of an iterable into individual elements.
The spread operator is a method for defining functions in JavaScript.
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is variable scope and why is it important?
Variable scope is the method of defining variable types in a programming language.
Variable scope refers to the physical location of a variable in memory.
Variable scope is the context in which a variable is accessible in a program, and it is important for managing variable visibility, memory usage, and preventing conflicts.
Variable scope is the process of encrypting variable data for security.
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How do you declare a 2D array in JavaScript?
let array2D = [1, 2, 3, 4];
let array2D = {1: [2, 3], 4: [5, 6]};
let array2D = new Array(2, 2);
let array2D = [[1, 2], [3, 4]];
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which method would you use to find the length of a string?
Use the 'length' property or function.
Use the 'size' method.
Count the number of characters manually.
Apply the 'getLength()' function.
Create a free account and access millions of resources
Similar Resources on Wayground
11 questions
Logika Dan Algoritma P9

Quiz
•
University
20 questions
C - Strings

Quiz
•
University
18 questions
Data Structures Quiz 1

Quiz
•
12th Grade - University
20 questions
js DOM

Quiz
•
12th Grade - Professi...
19 questions
C Programming Quiz

Quiz
•
University
20 questions
Guess the CS Term!

Quiz
•
University
15 questions
QUIZ-5: MYSQL & File Handling

Quiz
•
University
20 questions
Week 2 - Assessment 2 (ITNW0223)

Quiz
•
University
Popular Resources on Wayground
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
10 questions
Nouns, nouns, nouns

Quiz
•
3rd Grade
10 questions
9/11 Experience and Reflections

Interactive video
•
10th - 12th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
11 questions
All about me

Quiz
•
Professional Development
22 questions
Adding Integers

Quiz
•
6th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
9 questions
Tips & Tricks

Lesson
•
6th - 8th Grade
Discover more resources for Computers
21 questions
Spanish-Speaking Countries

Quiz
•
6th Grade - University
20 questions
Levels of Measurements

Quiz
•
11th Grade - University
7 questions
Common and Proper Nouns

Interactive video
•
4th Grade - University
12 questions
Los numeros en español.

Lesson
•
6th Grade - University
7 questions
PC: Unit 1 Quiz Review

Quiz
•
11th Grade - University
7 questions
Supporting the Main Idea –Informational

Interactive video
•
4th Grade - University
12 questions
Hurricane or Tornado

Quiz
•
3rd Grade - University
7 questions
Enzymes (Updated)

Interactive video
•
11th Grade - University