var twoSum = function(nums, target) {
    
    
    let index = 0
    let i = 1
    while (index <= nums.length - 1) {
            while (i <= nums.length - 1) {
                if (nums[index] + nums[i] === target) {
                    if (nums[index] === nums[i]) {
                        i = i + 1
                    }
                  return([index, i])
                } else {
                    i = i + 1
                }
            }
        index = index + 1
        i = 0
    }
};
twoSum([3, 3], 6)
expected output: [0, 1] received: [0, 2]
description: Given an array of integers nums and an integer target, return indices of the two numbers such that they add up to target.
 
     
     
     
     
     
    