javascriptOtherMedium
Flattening stops after one level
Time: 0:00
Test a custom input to verify an edge case (e.g. empty lists, negative numbers, duplicates).
⏱️0:00
This bug belongs to the mutation and copying bugs pattern
Assignment does not copy, spread copies only one level deep, and sort() changes the original array.