var twoSum = function(nums, target) {
for(let i = 0; i < nums.length; i++) {
for(let j = i + 1; j < nums.length; j++) {
if(nums[i] + nums[j] === target) {
return [i, j]
}
}
}
};
function twoSum(a, t) {
let o = {};
for (let i = 0; i < a.length; i++) {
if (o[a[i]] !== undefined) return [o[a[i]], i];
o[t - a[i]] = i;
}
}