📅  最后修改于: 2022-03-11 14:48:33.800000             🧑  作者: Mango
let numbers: number[] = [1, 2, 3, 4, 5];
function addNumbers(i: number): number {
let sum: number = (numbers[i] += 1);
return sum;
}
let add: number = addNumbers(2);
console.log(add);