Given an integer array nums and an integer target, return the index of the first occurrence of target in nums, or -1 if it is not present. Walk the array linearly — no assumption of sortedness.
1 ≤ nums.length ≤ 10⁴-10⁴ ≤ nums[i], target ≤ 10⁴nums may contain duplicates; return the index of the first one.Scan from index 0; return as soon as you see a match.
2