an alternative method to SetTimeout() using promises
Array Duplicate Counter : Count and sort duplicate value in an Array.