function searchArray(arr, target) {\n    for (let i = 0; i < arr.length; i++) {\n        if (arr[i] == target) {\n            return i;\n        }\n    }\n    return -1;\n }
Write a function to search an array?