Given an array of integers nums, return the sum of all even numbers in the array.
Example 1: Input: nums = [1,2,3,4,5,6] Output: 12
Example 2: Input: nums = [1,3,5] Output: 0
Constraints: 1 <= nums.length <= 100 -1000 <= nums[i] <= 1000
Given an array of integers nums, return the sum of all even numbers in the array.
Example 1: Input: nums = [1,2,3,4,5,6] Output: 12
Example 2: Input: nums = [1,3,5] Output: 0
Constraints: 1 <= nums.length <= 100 -1000 <= nums[i] <= 1000
Copyright 2026 algowars. All rights reserved.
Input 1 (integer_array)
[1,2,3,4,5,6]
Output 1 (integer)
12