
Functional Programming in JavaScript
Quiz
•
Mathematics
•
1st - 5th Grade
•
Practice Problem
•
Hard

Anonymous Anonymous
FREE Resource
Enhance your content
7 questions
Show all answers
1.
MULTIPLE SELECT QUESTION
45 sec • 1 pt
Let point be an object { x: 0, y: 0 }. What is the result of { x: 1, ...point }?
{ x: 0, y: 0 }
{ x: 0, y: 1 }
{ x: 1, y: 0 }
{ x: 1, y : 1 }
2.
MULTIPLE SELECT QUESTION
45 sec • 1 pt
What is the output of the console.log?
{ x: 0, y: 0 }
[ 0, 0 ]
undefined
[Function: getPoint]
3.
MULTIPLE SELECT QUESTION
45 sec • 1 pt
What will happen if the following code is executed?
A SyntaxError will be raised in the first line.
A SyntaxError will be raised in the second line.
The console.log will output [] (i.e. the empty array)
The console.log will output [Function (anonymous)]
4.
MULTIPLE SELECT QUESTION
45 sec • 1 pt
What does { ...obj1, ...obj2 } do (assuming that obj1 and obj2 are objects)?
Creates a new object containing obj1 and obj2 as properties.
Creates a new object containing the keys of obj1 and obj2 as properties.
Creates a new object containing keys of obj1 and obj2 as properties unless obj1 or obj2 have equal keys.
Copies obj2 into obj1.
5.
MULTIPLE SELECT QUESTION
45 sec • 1 pt
Which of these statements about the filter method is true?
It retrieves all of the elements that meet a certain predicate
The returned elements are deep copied
The returned elements are shallow copied
It only works for primitive values
6.
MULTIPLE SELECT QUESTION
45 sec • 1 pt
What does the expression Object.entries({ x: 0, y: 0 }).map(([x1, x2]) => [x1, x2]) return?
{ x: 0, y: 0 }
[ [ 'x', 0 ], [ 'y', 0 ] ]
Nothing, a SyntaxError will happen
[ 0, 0 ]
7.
MULTIPLE SELECT QUESTION
45 sec • 1 pt
Which of these statements are true about pure functions?
They have no side effects
They are easily testable
They don't mutate global state
Their output(s) depends only on their input(s)
Similar Resources on Wayground
12 questions
Factorizing #1
Quiz
•
1st - 12th Grade
10 questions
Ai thông minh hơn học sinh lớp 4 :))
Quiz
•
3rd - 4th Grade
10 questions
Revisão 4 ano Mat
Quiz
•
1st Grade
10 questions
Matematika. Skaičiaus dalys.
Quiz
•
2nd Grade
11 questions
REPASO DE MEDIDAS AGRARIAS Y MULTIPLOS Y SUBMULTIPLOS
Quiz
•
5th Grade
11 questions
Ratios
Quiz
•
5th - 6th Grade
11 questions
BẢNG CỘNG 2 TRONG PHẠM VI 10
Quiz
•
1st Grade
10 questions
suma 1
Quiz
•
3rd Grade
Popular Resources on Wayground
20 questions
Brand Labels
Quiz
•
5th - 12th Grade
11 questions
NEASC Extended Advisory
Lesson
•
9th - 12th Grade
10 questions
Ice Breaker Trivia: Food from Around the World
Quiz
•
3rd - 12th Grade
10 questions
Boomer ⚡ Zoomer - Holiday Movies
Quiz
•
KG - University
25 questions
Multiplication Facts
Quiz
•
5th Grade
22 questions
Adding Integers
Quiz
•
6th Grade
10 questions
Multiplication and Division Unknowns
Quiz
•
3rd Grade
20 questions
Multiplying and Dividing Integers
Quiz
•
7th Grade
Discover more resources for Mathematics
25 questions
Multiplication Facts
Quiz
•
5th Grade
10 questions
Multiplication and Division Unknowns
Quiz
•
3rd Grade
15 questions
Order of Operations
Quiz
•
5th Grade
20 questions
place value
Quiz
•
4th Grade
20 questions
Adding and Subtracting Decimals
Quiz
•
5th Grade
20 questions
Place Value and Rounding
Quiz
•
4th Grade
20 questions
Division Facts
Quiz
•
3rd Grade
10 questions
Multiplying Fractions
Quiz
•
5th Grade