Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!1.eu.feeder.erje.net!weretis.net!feeder4.news.weretis.net!feeder1.news.weretis.net!news.solani.org!.POSTED!not-for-mail From: Thomas 'PointedEars' Lahn Newsgroups: comp.lang.javascript Subject: Re: Expression for the global object Supersedes: <1672282.yeHJ0DhY8R@PointedEars.de> Date: Sun, 31 May 2015 16:12:03 +0200 Organization: PointedEars Software (PES) Lines: 23 Message-ID: <7546503.qSl4iIXIz1@PointedEars.de> References: <87twuthx5h.fsf@bsb.me.uk> <5452925.Zt9fTqAOub@PointedEars.de> <87382cj1f5.fsf@bsb.me.uk> Reply-To: Thomas 'PointedEars' Lahn Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8Bit X-Trace: solani.org 1433081680 24078 eJwFwQkBwDAIA0BLhRIeOQsM/xJ6h+viHeZww2KZaRydrjzCo60TOMP/CtbdijbYyI8lJikPHgMQ0Q== (31 May 2015 14:14:40 GMT) X-Complaints-To: abuse@news.solani.org NNTP-Posting-Date: Sun, 31 May 2015 14:14:40 +0000 (UTC) User-Agent: KNode/4.14.2 Cancel-Key: sha1:NBagt7CfvQMiey0fwt8JuWlc7Q0= X-User-ID: eJwNycEBwCAIA8CVQELAcaw0+4/Q3vcy6LwFJpFKUZczFlP7YMLbz5SNozV+iceI/8IFQ3Wo11lHaftdQeUHUUkVBQ== Cancel-Lock: sha1:Swi+y1n6gVF+PsDxd7jOSOhz3ZY= X-NNTP-Posting-Host: eJwFwQERADEIAzBLY9DukPMU8C/hEziNekEwsFjTLc/o1PmqgeWQR9R6+CsZLm2TaeqZ4A8hDhE2 Xref: csiph.com comp.lang.javascript:27942 Ben Bacarisse wrote: > (function () { return eval; })()("this") In all respects equivalent to eval("this") which is equivalent to this which is why it does not return a reference to the global object, but the “undefined” value, in strict function code that is not called as the method of an object. -- PointedEars FAQ: | SVN: Twitter: @PointedEars2 | ES Matrix: Please do not cc me. / Bitte keine Kopien per E-Mail.