This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
Let's say I want to input (10) values into an array, and have them averaged, ok. Should I read each number in separately and them set those numbers to an array address? And is there an '.average' method? How can I make this quick and easy to follow (mostly for myself). Thanks in advance.
Use a for loop to read in numbers, use a var like sum to sum the values as you read them in and then finally divide by the number of elements. There is no .average method. There is .length- it is not a method.