Alexander Foken: Zitat der Woche

Beitrag lesen

Moin Moin !

Erstmal ein Tipp:
Du schreibst
quotes[0] = "...."
quotes[1] = "..."
Um zu vermeiden, das du, falls du ein Zitat streichen willst, alle Indizes ändern musst, würde ich folgende Funktion benutzen:

function add(text)
{
    quotes[quotes.length] = text;
}
add('....');
add('....');
add('....');

Warum nicht einfach var quotes=new Array('...','...','...') ?

Alexander

--
Nein, ich beantworte keine Fragen per eMail. Dafür ist das Forum da.
Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so!"
Für eine bessere Übersichtsdarstellung des Forums: http://cforum.teamone.de/phpbt/bug.php?op=show&bugid=103&pos=2