Path: csiph.com!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!news.unit0.net!takemy.news.telefonica.de!telefonica.de!newsfeed.arcor.de!newsspool4.arcor-online.net!news.arcor.de.POSTED!not-for-mail Content-Type: text/plain; charset="UTF-8" Message-ID: <1629412.iLo1Md9sQa@PointedEars.de> From: Thomas 'PointedEars' Lahn Reply-To: Thomas 'PointedEars' Lahn Organization: PointedEars Software (PES) Date: Mon, 06 May 2013 01:09:50 +0200 User-Agent: KNode/4.8.5 Content-Transfer-Encoding: 8Bit X-Face: %i>XG-yXR'\"2P/C_aO%~;2o~?g0pPKmbOw^=NT`tprDEf++D.m7"}HW6.#=U:?2GGctkL,f89@H46O$ASoW&?s}.k+&. <51863ea9$0$6640$9b4e6d93@newsspool2.arcor-online.net> <5148182.RP0mX05cp1@PointedEars.de> MIME-Version: 1.0 Lines: 32 NNTP-Posting-Date: 06 May 2013 01:09:50 CEST NNTP-Posting-Host: 071dc343.newsspool2.arcor-online.net X-Trace: DXC=[[S3ikQQ7jY=>bdbdS?M0YA9EHlD;3YcR4Fo<]lROoRQ8kFmb8JVP X-Complaints-To: usenet-abuse@arcor.de Xref: csiph.com comp.lang.javascript:19644 Thomas 'PointedEars' Lahn wrote: > saurabh.khemka4@gmail.com wrote: >> Suppose I have a variable declared in javascript file(1.js) >> >> game = "abc"; > > This is _not_ a variable declaration. A variable declaration starts with > > var > > followed by the variable identifier, and an optional initialization part. > > You are attempting to add a property named “game” to an object, which, by > contrast to a variable declaration, can fail even if syntactically > correct. > > For example, if there is an element with name or ID “abc” in your ^^^^^^^^^^^^^^^^ I meant name or ID “game”, of course. The left-hand side of the simple assignment specifies name of the property whose value may not be modifiable. > document, and you are using IE/MSHTML, this assignment *will* fail because > the global object or another object before it in the scope chain already > has a non- writable property of that name that refers to the corresponding > object. -- PointedEars Twitter: @PointedEars2 Please do not Cc: me. / Bitte keine Kopien per E-Mail.