Untitled
unknown
javascript
5 years ago
289 B
8
Indexable
const twoSum = function(nums, target) {
for (let first = 0; first < nums.length; first++) {
for (let second = 0; second < nums.length; second++) {
if (nums[first] + nums[second] == target && first != second)
return [first, second]
}
}
};Editor is loading...