JSFiddle - React, Tailwind, and code Playground
by Jussia
JavaScript
var uniqueInOrder = function (iterable) {
//your code here - remember iterable can be a string or an array
var iterableArray = typeof(iterable) !== 'array' ? iterable.split("") : iterable;
var result = iterableArray.reduce(function(previousValue, currentItem) {
return previousValue
}, [])
}
console.log(uniqueInOrder('AAAABBBCCDAABBB'))