MAP & FILTER JS

MAP & FILTER JS

5 Qs

quiz-placeholder

Similar activities

Belajar TIK

Belajar TIK

KG - University

5 Qs

Be a Quiz Whiz! Love Your Locks

Be a Quiz Whiz! Love Your Locks

4th Grade

7 Qs

Intro to Shakespeare/ Intro to Romeo & Juliet Quiz

Intro to Shakespeare/ Intro to Romeo & Juliet Quiz

KG - University

10 Qs

Math Quiz G5

Math Quiz G5

5th Grade

10 Qs

BAB 4 PENGELOLAAN BISNIS RITEL

BAB 4 PENGELOLAAN BISNIS RITEL

9th - 12th Grade

10 Qs

Internal Combustion Engine

Internal Combustion Engine

KG - University

8 Qs

MAP & FILTER JS

MAP & FILTER JS

Assessment

Quiz

others

Practice Problem

Hard

Created by

Kouba Chorfi

FREE Resource

AI

Enhance your content in a minute

Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...

5 questions

Show all answers

1.

FILL IN THE BLANK QUESTION

30 sec • 1 pt

Predict the OUTPUT of this code Snippet: const numbers = [1, 2, 3, 4]; const doubled = numbers.map(item => item * 2); console.log(doubled);

2.

FILL IN THE BLANK QUESTION

30 sec • 2 pts

Predict the OUTPUT of this code Snippet: const numbers = [1, 2, 3, 4]; const evens = numbers.filter(item => item % 2 === 0); console.log(evens);

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Choose the correct OUTPUT: const students = [ { name: 'Quincy', grade: 96 }, { name: 'Jason', grade: 84 }, { name: 'Alexis', grade: 100 }, { name: 'Sam', grade: 65 }, { name: 'Katie', grade: 90 } ]; const studentGrades = students.filter(student => student.grade >= 90); return studentGrades;

[ { name: 'Quincy', grade: 96 }, { name: 'Alexis', grade: 100 }, { name: 'Katie', grade: 90 } ]
[ { name: 'Jason', grade: 84 }, { name: 'Sam', grade: 65 } ]
[ { name: 'Katie', grade: 90 }, { name: 'Alexis', grade: 100 }, { name: 'Quincy', grade: 96 }]

4.

FILL IN THE BLANK QUESTION

30 sec • 1 pt

Predict the output of this code: var arr = [1.5, 2.56, 5.1, 12.33]; var rounded = arr.map(Math.ceil); console.log(rounded);

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Choose the correct OUTPUT: let employees = [ { "id": 11, "name":"Abhinav", "salary":75000 }, { "id": 2131, "name":"Raj", "salary":62000 }, { "id": 3012, "name":"Raj", "salary":32000 }] let idsArray = employees.map(employee =>employee.id) console.log(idsArray)

[{"id":11} , {"id":2131}, {"id":3012}]
[11,2131,3012]
[32000,62000,75000]

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?