题目:Given nums = [2, 7, 11, 15], target = 9, Because nums[0] + nums[1] = 2 + 7 = 9, return [0, 1] 代码:(1.22) /** * @param {number[]} nums * @param {number} target * @return {number[]} */ var twoSum = function(nums, target) {//给定两个参数nums,target var resu…