I want to increase the value depending on the key name. I have an array with scores:
[50,50,60,70,80,90,90,100]
Grade A: score<100 and score>=90
Grade B: score<90 and score>=80
Grade C: score<80 and score>=60
Grade D: score<60 and score>=0
In the end, I want to get an object with countable scores:
{A:0, B:0, C:0, D:0 };