Javascript Function Argument Passing Question 1

Introduction

We would like to know the output of the following code:

function curve(arr, amount) { 
   for (let i = 0; i < arr.length; ++i) { 
      arr[i] += amount; 
   } 
} 

let grades = [77, 73, 74, 81, 90]; 
curve(grades, 5); 
console.log(grades);


82,78,79,86,95



PreviousNext

Related