lies
var twoSum = function (nums, target) { var table = {} for (var i = 0; i < nums.length; i++) { var dis = target - nums[i] if (table.hasOwnProperty(dis)) { return [table[dis], i] } else { table[nums[i]] = i } } }