elemen kenaikan dalam naskah array

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);
Creepy Gábor