I am trying to create a new key-value or associative array "gradepoints" using two old arrays "grades" and "array". I tried with and without curly braces in the loop.
var gradepoints = [];
for(var i=0; i<array.length; i++) {
gradepoints[i] = {array[i] : grades[array[i]] };
}