You made it too complicated:
```
Number.prototype.odd = function() { return this % 2 == 1 }
```
is all you need.

You can test it via
```
expect((3).odd()).toBe(true);
expect((2).odd()).toBe(false);
var temp = 3;
expect(temp.odd()).toBe(true);
```


On Wed, Apr 16, 2014 at 2:24 PM, Eric Ricketts <notifications@github.com>wrote:

> In app/assets/javascripts/Hand.js:
>
> > @@ -0,0 +1,165 @@
> > +function Hand() {
> > +  this._cards = [];
> > +  this._pairs = [];
> > +}
> > +
> > +function isOdd (number) {
>
> Ken,
> Created the NumberExtensions.js file, defined it as ->
> function Number (number) {
> this._number = number;
> }
>
> Number.prototype.isOdd = function() {
> return this._number % 2 === 1;
> };
> error says "Uncaught TypeError: Cannot set property "isOdd" of undefined."
> kept isOdd in the Hand.js file to keep the tests passing.
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/EricRicketts/GoodCleanGames/pull/2/files#r11698924>
> .
>



-- 
Ken Auer
Software Craftsman
RoleModel Software              919-557-7550 (v)
6720 RoleModel Way            626-544-2015 (f)
Holly Springs, NC 27540       919-622-8315 (m)

    "Christianity is not a plug-in, it's an operating system" (see Mark
12:28-31)