Can someone help me understand the correct way to implement object literals into algorithms? I am trying to solve a problem where a function takes two arrays and a callback function and creates a new object where if callback(array1) === array2, it returns a new object where {array1 : array2}. I think I now logic just am so lost on implementation. Here is my code:

```
//construct function that accepts two arrays, callback
const objOfMatches = (array1, array2, callback) => {
//create empty objOfMatches
const matches = new Object();
//loop through array1[i] and check if matches with array2[i]
for (let i = 0; i < array1.length; i++) {
//if callback(array1) === array2
//create new key, array1[i] : array2[i]
if (callback(array1[i]) === array2) {
matches.match = array1[i]
function objectman (array2) {
this.matches = array2
}
}
}
return matches
}
```

Any help would be majestic!