[clug] javascript jquery and long calls
Neill Cox
neill at ace-hosting.com.au
Wed Mar 30 04:53:09 MDT 2011
On Wed, Mar 30, 2011 at 6:12 PM, Neill Cox <neill at ace-hosting.com.au> wrote:
A truly stupid snippet of JavaScript
> x = function () { this.b = 'fred'; return this.b }
> function () { this.b = 'fred'; return this.b }
> y = function () { this.b = 'george'; return this.b }
> function () { this.b = 'george'; return this.b }
> z = { f_x:x, f_y:y }
> Object
> z.f_x
> function () { this.b = 'fred'; return this.b }
> z.f_x()
> "fred"
> z.f_y()
> "george"
>
>
For which he would like to apologise, having realised that it proves nothing
at all except that he should think things through a little more before
posting :-(
Cheers,
Neill
More information about the linux
mailing list