I have a negativeArray of length 5 and I want to apply the \'rating-type__pipe--active\' class only to the first three elements in the code below and not on the last two ele