Skip to content

Latest commit

 

History

History
23 lines (12 loc) · 718 Bytes

File metadata and controls

23 lines (12 loc) · 718 Bytes

Challenge Summary

Code Challenge 2: ArrayShift

Challenge Description

Insert a new value into the middle of an array while keeping everything in numberical order.

Approach & Efficiency

We used a for loop with array.splice. Inside the for loop we used a conditional statement to compare each element to the target input. If the target element is more than the current element, than we splice the input directly at the current index.

Solution

WhiteBoard