Thank you both for your help. I should have posted the entire code I was using. I passed in grades which was previously declared as an array. I didn't realize I had to re-declare it as such again with the function. Chalk another one up to a newbie making a bonehead mistake.