MAP & FILTER JS

MAP & FILTER JS

5 Qs

quiz-placeholder

Similar activities

ПЗ-11 Oracle

ПЗ-11 Oracle

KG - University

10 Qs

Syllabus: Expectations and Policies

Syllabus: Expectations and Policies

8th Grade

10 Qs

An invitation to a job interview – Preparation Task

An invitation to a job interview – Preparation Task

KG - University

6 Qs

An invitation to a job interview – Preparation Task

An invitation to a job interview – Preparation Task

KG - University

6 Qs

September Academic Vocab Quiz

September Academic Vocab Quiz

KG - University

10 Qs

Oracle ПЗ-7

Oracle ПЗ-7

KG - University

10 Qs

STAAR Wars: Mission 3

STAAR Wars: Mission 3

Professional Development

5 Qs

MAP & FILTER JS

MAP & FILTER JS

Assessment

Quiz

others

Hard

Created by

Kouba Chorfi

FREE Resource

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]