Find Numbers with Even Number of Digits

Easy

Given an array nums of integers, return how many of them contain an even number of digits.

Example 1

findNumbers()
Input
nums = [12,345,2,6,7896]
Output
2

Why

12 and 7896 have 2 and 4 digits.

Example 2

findNumbers()
Input
nums = [555,901,482,1771]
Output
1
Constraints
1 <= nums.length <= 500
1 <= nums[i] <= 10^5

Topics

ArraysMath

Implement findNumbers in the editor and return the answer — printing it is never graded.