Implement the function uniqueInOrder which takes as argument a string or array and returns an array of items with the repeated elements removed.
For example:
function uniqueInOrder(input){
// write your code here
}
console.log(uniqueInOrder('AAAABBBCCDAABBB'));// ['A', 'B', 'C', 'D', 'A', 'B']
console.log(uniqueInOrder('ABBCcAD'));// ['A', 'B', 'C', 'c', 'A', 'D']
console.log(uniqueInOrder([1,2,2,3,3]));// [1,2,3]
Please watch this video for a hint for the problem.