I know. You should have given an example spec that caught that loophole. :)

Emilie Reiser
emilie.reiser@gmail.com
 <emilie.reiser@gmail.com>US:: 646.327.8220  Haiti:: 509.4813.4162


On Fri, Feb 21, 2014 at 12:50 PM, Alex Grant <notifications@github.com>wrote:

> In src/quiz.js:
>
> > @@ -20,6 +26,23 @@ var QUIZ_TOPICS = ['javascript', 'jasmine', 'testing'];
> >  //  [2, 6, 9, 11] => 7.5
> >  //  [9, 8, 2, 4, 7] => 4.67
> >
> > +quiz.averageMedian = function(array){
> > +	var i, length, sum, array;
> > +	array.splice(0, 1);
> > +	array.splice(-1, 1);
> > +
> > +	i = 0;
> > +	length = array.length;
> > +	sum = 0.0;
> > +
> > +	for(; i < length;){
> > +		sum = sum + array[i];
> > +		i = i + 1;
> > +	};
> > +	return sum/length;
> > +
>
> This function takes the average of all elements in the array except for
> the outer two, not the average of the middle two or three items (though
> those things happen to be the same in the examples)
>
> --
> Reply to this email directly or view it on GitHub<https://github.com/ga-wdi-boston/wdi_7_js_quiz_3_jasmine/pull/20/files#r9954506>
> .
>