Here is what i have to start with, I'm learning javascript so please be as simplified as possible with your response. I understand if you have to be more detailed, please do so. Instructions are:
/*
create a function named 'avgNumbers'
- accept 1 parameter into the function that will be an array of unlimited numbers
- find the average of all the numbers
- return the average from the function
- console.log the answer outside of the function
*/
//Code start here
console.log("1. avg of an array of numbers");
var avgNumbers = function(arr){
}
console.log('avg number = ', avgNumbers([1,2,3,4,5]));