Learning JS. Given a solution for twoSum in leetcode as follows:

```
var twoSum = function(nums, target) {
let myObj = {}
for (let i = 0; i < nums.length; i++) {
let first = nums[i]
let second = target - first
if (myObj[second] !== undefined) {
return [myObj[second], i]
} else myObj[first] = i
}
}
```

I would like to understand what it means by myObj[second] and return [myObj[second], i]. thanks