AlMalalah Posted January 23, 2014 Report Share 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 Link to comment Share on other sites More sharing options...
nedo Posted January 23, 2014 Report Share 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 Link to comment Share on other sites More sharing options...
AlMalalah Posted January 23, 2014 Author Report Share Posted January 23, 2014 Mersi, cred ca am inteles. Quote Link to comment Share on other sites More sharing options...
p3bogdan Posted January 23, 2014 Report Share Posted January 23, 2014 Dar ce este array, si ce face? Quote Link to comment Share on other sites More sharing options...
Silviu Posted January 23, 2014 Report Share Posted January 23, 2014 Dar ce este array, si ce face?Array = Matrice. JavaScript Array Object Quote Link to comment Share on other sites More sharing options...