Consider following snippet:
 var nyc = { fullName: "New York City", mayor: "Bill de Blasio", population: 8000000, boroughs: 5 }; 
Which code will print all properties of nyc object?
The statement iterates over the enumerable properties of an object, in arbitrary order. For each distinct property, statements can be executed. Example:

var object = { 
   property: 'value',
   property2: 'value' 
for (var property in object) {
   // do something here

Следи за CodeGalaxy

Мобильное приложение Beta

Get it on Google Play
Обратная Связь
Зарегистрируйся сейчас
или Подпишись на будущие тесты