I am trying to find the index of the first non-zero number in an array.
Consider an array: [0;0;1;2;0;4;5;6]
The expected result will be index of number 1
which should return the index result of 2
.
It will be great if the answer avoids the use of sequence operator and loops.