0
Array of names in a function?
/** * @param {Array<string>} arrayOfPeople - an array of people's names * @returns {number} the length of the given array of names */ function numberOfPeople(arrayOfPeople) { return arrayOfPeople = ["Alex", "Beau", "Carlos", "Dustin"]; } console.log(numberOfPeople(arrayOfPeople.length)); //says arrayOfPeople is undefined?
1 Odpowiedź