Easiest Javascript solution with O(n)
var smallestEqual = function(nums) {\n    let arr = nums.length;\n    for(let i=0;i<arr;i++){\n        if(i % 10== nums[i]){\n            return  i\n        } \
var smallestEqual = function(nums) {\n    let arr = nums.length;\n    for(let i=0;i<arr;i++){\n        if(i % 10== nums[i]){\n            return  i\n        } \n    }\n\n    return -1\n    \n};
['JavaScript']