0
/ 10
Return the index of the last occurrence of a given number in an array. Return -1 if the number is not in the array.
Return the index of the last occurrence of a given number in an array. Return -1 if the number is not in the array.
Examples:
findTheLastNumber({3,3,4,4},4) -> 3
findTheLastNumber({3,3,4,4},5) -> -1
findTheLastNumber({3,3,3,3},3) -> 3
Your feedback will appear here when you check your answer.