Create a Go program to find the index of an element in a slice using a loop.
EasyProblem Statement
Create a Go program to find the index of an element in a slice using a loop.
Sample Input
A slice of integers (e.g., [10, 20, 30, 40]) and an element to find (e.g., 30).
Sample Output
2
Limits
Time: 2s · Memory: 256 MB