切换主题
function search(nums: number[], target: number): number { let index: number = -1 nums.map((val, i) => { if (val == target) { index = i } }) return index };
de5fa