Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.javascript > #25932
| From | Thomas 'PointedEars' Lahn <PointedEars@web.de> |
|---|---|
| Newsgroups | comp.lang.javascript |
| Subject | Re: Why: X[i] = x[i] = undefined when x[i] defined? |
| Date | 2014-10-17 21:51 +0200 |
| Organization | PointedEars Software (PES) |
| Message-ID | <3496960.XX3CMxuZ7L@PointedEars.de> (permalink) |
| References | (1 earlier) <m1rf17$2te$2@dont-email.me> <95g24apb19udm64v45cehj91b6nj7uo3jb@4ax.com> <0ol24alq2cr6m3hosessv298crkhsnh7ck@4ax.com> <2394444.guKU09TTg3@PointedEars.de> <llr24al57aqodrs2585596a1ef5jd72mi9@4ax.com> |
Ed Jay wrote:
> […] Thomas 'PointedEars' Lahn […] wrote:
>> What you actually have neglected is to declare x_pos_array and
>> y_pos_array variables by using the var keyword:
>>
>> var x_pos_array = [];
>> var y_pos_array = [];
>>
>> Not doing this causes your code to be more error-prone than it needs to
>> be. You might be accidentally accessing a property of the global object,
>> and your code will maybe compile, but certainly not run in ES5+ strict
>> mode.
>
> Thank you!
You are welcome. As you did not know this, what did you mean by
>>> Neglected to declare div as an array.
? In the code that you posted –
>>> var div = document.createElement('div');
>>> image_holder.appendChild(div);
>>> div.id = 'mrkr'+marker_cnt;
– “div” does not refer to an Array instance; it refers to a “div” element
object.
>> Please provide a working contact e-mail address in the From header field,
>> see also <http://www.interhack.net/pubs/munging-harmful/>.
>
> Remove the M and you have it.
It is not socially acceptable behavior of you to expect others to fiddle
with the “To:” field before being able to contact you via e-mail. (Your
signature might not even be displayed.)
Also, please trim your quotations to the relevant minimum (this is also
recommended in the FAQ). Bandwidth may not be as precious as in the early
days of Usenet, but free time still is.
--
PointedEars
FAQ: <http://PointedEars.de/faq> | SVN: <http://PointedEars.de/wsvn/>
Twitter: @PointedEars2 | ES Matrix: <http://PointedEars.de/es-matrix>
Please do not Cc: me. / Bitte keine Kopien per E-Mail.
Back to comp.lang.javascript | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Why: X[i] = x[i] = undefined when x[i] defined? Ed Jay <edMbj@aes-intl.com> - 2014-10-17 01:50 -0700
Re: Why: X[i] = x[i] = undefined when x[i] defined? Denis McMahon <denismfmcmahon@gmail.com> - 2014-10-17 16:10 +0000
Re: Why: X[i] = x[i] = undefined when x[i] defined? Ed Jay <edMbj@aes-intl.com> - 2014-10-17 09:29 -0700
Re: Why: X[i] = x[i] = undefined when x[i] defined? Ed Jay <edMbj@aes-intl.com> - 2014-10-17 10:52 -0700
Re: Why: X[i] = x[i] = undefined when x[i] defined? Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2014-10-17 21:29 +0200
Re: Why: X[i] = x[i] = undefined when x[i] defined? Ed Jay <edMbj@aes-intl.com> - 2014-10-17 12:32 -0700
Re: Why: X[i] = x[i] = undefined when x[i] defined? Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2014-10-17 21:51 +0200
Re: Why: X[i] = x[i] = undefined when x[i] defined? Ed Jay <edMbj@aes-intl.com> - 2014-10-17 13:21 -0700
Re: Why: X[i] = x[i] = undefined when x[i] defined? Dr J R Stockton <reply1400@merlyn.demon.co.uk.invalid> - 2014-10-18 21:38 +0100
Re: Why: X[i] = x[i] = undefined when x[i] defined? John Harris <niam@jghnorth.org.uk.invalid> - 2014-10-18 10:36 +0100
Re: Why: X[i] = x[i] = undefined when x[i] defined? Denis McMahon <denismfmcmahon@gmail.com> - 2014-10-18 22:17 +0000
Re: Why: X[i] = x[i] = undefined when x[i] defined? Dr J R Stockton <reply1400@merlyn.demon.co.uk.invalid> - 2014-10-19 22:54 +0100
csiph-web