Algorithms
Algorithms
3. If the target value matches the current element, return the index of the
current element.
4. If the target value does not match the current element, move to the
next element in the array.
5. Repeat steps 2-4 until the target value is found or the end of the array
is reached.
6. If the target value is not found, return a value indicating that the
element was not found (e.g. -1).
Example Code
```
if (array[i] == target) {
```