ExamGecko
Question list
Search
Search

List of questions

Search

Related questions











Question 182 - Certified JavaScript Developer I discussion

Report
Export

Refer to the following array:

Let arr = [1, 2, 3, 4, 5];

Which three options result in x evaluating as [1, 2]?

Choose 3 answer

A.
let x = arr. slice (2);
Answers
A.
let x = arr. slice (2);
B.
let x = arr. slice (0, 2);
Answers
B.
let x = arr. slice (0, 2);
C.
let x arr.filter((a) => (return a <= 2 });
Answers
C.
let x arr.filter((a) => (return a <= 2 });
D.
let x = arr.filter ((a) => 2 }) ;
Answers
D.
let x = arr.filter ((a) => 2 }) ;
E.
let x =arr.splice(0, 2);
Answers
E.
let x =arr.splice(0, 2);
Suggested answer: B, C, E
asked 23/09/2024
Sasha Grib
44 questions
User
Your answer:
0 comments
Sorted by

Leave a comment first