Welcome to the Treehouse Community
Looking to learn something new?
Tomasz Grodzki7,705 Points
The function addNewTeachers() works without any parameters. So, why should I create any parameters in this function?
I deleted a parameter newTeachers from addNewTeachers() function and it works the same like with this parameter. So why should I bother about adding any parameter?
Steven Parker218,832 Points
The advantage of the parameter would be that when you had several arrays of teachers to add, you could call it once for each one, passing it as the argument.
It would also be useful in situations where the array to be added is not in the global scope, so the function cannot access it directly.