I can achieve this using the for loop but I cant figure out how to use forEach to do the same.
for example:
var input = [['make', 'Ford'], ['model', 'Mustang'], ['year', 1964]];
calling the function should result in:
{
make : 'Ford',
model : 'Mustang',
year : 1964
}