Article View: pl.comp.lang.javascript
Article #50339Re: To jak to jest z tymi zmiennymi lokalnymi w javascript
From: Paweł Piskorz
Date: Sun, 17 Oct 2010 11:36
Date: Sun, 17 Oct 2010 11:36
19 lines
1420 bytes
1420 bytes
On 2010-10-17 11:48, Peter May wrote:
> Dodam jeszcze do tego, co napisał "cut", żebyś nie stosował takiego zapisu:
>
> for (i=0; i<=pola.length; i++)
>
> bo to oznacza, że z każdą pętlą przeliczasz ilość zmiennej "pola".
> Lepiej tak:
>
> var j = pola.length;
> for (var i=0; i<=j; i++)
A nie lepiej:
for ( var i=0; pola[i]; i++ ) ?
--
message[autor="PablO"]::after {
content:"Pozdrawiam";
}
Technical Details
Message-ID:
<i9en3m$equ$1@inews.gazeta.pl>Path:
mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.gazeta.pl!not-for-mailReferences:
<cd1d8241-606a-42c1-9b86-debb11ac6ee8@i21g2000yqg.googlegroups.com> <i9egol$q29$1@news.onet.pl>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.gazeta.pl!not-for-mail From: Paweł Piskorz <nie.ma.maila@psikre.nie?> Newsgroups: pl.comp.lang.javascript Subject: Re: To jak to jest z tymi zmiennymi lokalnymi w javascript Date: Sun, 17 Oct 2010 13:36:16 +0200 Organization: "Portal Gazeta.pl -> http://www.gazeta.pl" Lines: 19 Message-ID: <i9en3m$equ$1@inews.gazeta.pl> References: <cd1d8241-606a-42c1-9b86-debb11ac6ee8@i21g2000yqg.googlegroups.com> <i9egol$q29$1@news.onet.pl> NNTP-Posting-Host: 213-238-86-26.adsl.inetia.pl Mime-Version: 1.0 X-Trace: inews.gazeta.pl 1287315382 15198 213.238.86.26 (17 Oct 2010 11:36:22 GMT) X-Complaints-To: usenet@agora.pl NNTP-Posting-Date: Sun, 17 Oct 2010 11:36:22 +0000 (UTC) X-User: uhorek In-Reply-To: <i9egol$q29$1@news.onet.pl> User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.9) Gecko/20100915 Thunderbird/3.1.4 Hamster/2.1.0.11 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit