js challenge straight from ChatGPT 4 u autismos:
JS Challenge: Array Compression
Write a function that compresses consecutive duplicates in an array.
Rules
Keep the original order
Only remove consecutive duplicates
Return a new array
console.log(compress([1,1,2,2,2,3,1,1]))
// [1,2,3,1]
Comment too long. Click here to view the full text.