If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

uniqueInteger.counter throws me Reference error

// Initialize the counter property of the function object.
// Function declarations are hoisted so we really can
// do this assignment before the function declaration.
uniqueInteger.counter = 0;
// This function returns a different integer each time it is called.
// It uses a property of itself to remember the next value to be returned.
function uniqueInteger() {
return uniqueInteger.counter++; // Increment and return counter property
}

Well I meant writing the code in a HTML document and then showing the document in the browser - I should have explained that clearer. Pasting everything in the Firebug console gives me an error too. (I don't know completely how Firebug's console works, but I don't think writing code in it is the best idea - it's more for debugging code on a webpage.)

I've posted this code because i have problem with it too using firebug... Now i've undertand that firebug isn't good, so from now i will write the code inside html
Anyway i didn't understand what means "includes: function"... now i've understand it, it's a parameter of the object.. I had not seen that it was preceded by the inizializator range.methods = {