AlMalalah Posted January 23, 2014 Report Posted January 23, 2014 for (key in MyList) { MyObject[MyList[key]] = false }MyList este un array, asta e clar.Ce este MyObject ?Care e valoarea lui key ? Am cautat in tot codul si nu am gasit nicaeri definit key si ce valori ia key.E ceva standard in javascript sau care e faza cu key asta ?Multumesc ! Quote
nedo Posted January 23, 2014 Report Posted January 23, 2014 Key ia valoarea/indexul elementelor din MyList.key tine loc de "i" pentru ceva degenulfor(int i = 0; i < 10; i++){ instructiuni;}Ce face scriptul ala.myObject este un array care are ca index MyListiar fiecarui obiect din myList cu indexul key asigneaza valoarea false. Quote
AlMalalah Posted January 23, 2014 Author Report Posted January 23, 2014 Mersi, cred ca am inteles. Quote
Silviu Posted January 23, 2014 Report Posted January 23, 2014 Dar ce este array, si ce face?Array = Matrice. JavaScript Array Object Quote