DeepFrontend
Learning Paths
Practice
System Design & DS
Design Studio
Data Structures Curriculum
Real-World Case Studies
Careers
Job Board
Resume Builder
Blog
Sign in
Search
⌘K
Go Pro
Loading compiler resources...
JavaScript Quiz Practice
Active Recall Drill Session
← Exit Session
Question 1 of 1
easy
JavaScript
Why is array.unshift() considered expensive for large arrays?
A
It's not actually expensive — this is a myth
B
It's O(n) — every existing element must shift up one index to make room at the front
C
It only works on arrays smaller than 100 elements
D
It triggers a full garbage collection every time
Check Answer