Douglas Crockford wrote in his book (Page 4):
Throughout the book, a method
method is used to define new methods, This is its definition:
As an aside, on P40:
The end () means "use the function that this function returns", not the outer function that returns it.
If he had left off the final (), a call to deentityify would return a function, rather than a string.
In Douglas Crockford's own words:
We immediately invoke the function we just made with the () operator. That invocation creates and returns the function that becomes the deentityify method.