This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const friends = [ | |
{ | |
name: 'Сэм', | |
age: 29, | |
gender: 'Мужской', | |
email: 'luisazamora@example.com', | |
phone: '+7 (555) 505-3570', | |
favoriteFruit: 'Мороженое' | |
}, | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var students = { | |
Ang: { | |
focus: 90, | |
wisdom: 90 | |
}, | |
Jana: { | |
focus: 00, | |
wisdom: 50 | |
} | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
init: function(elevators, floors) { | |
var elevator = elevators[0]; // Let's use the first elevator | |
var pressedFloorNumbers = []; | |
for (var i = 0; i < floors.length; i++) { | |
// Накапливаем информацию об этажах, на которых нажаты кнопки вверх или вниз | |
floors[i].on("up_button_pressed", function(floor) { | |
if (pressedFloorNumbers.indexOf(floor.floorNum()) === -1) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
init: function(elevators, floors) { | |
//var elevator1 = elevators[0]; // Let's use the first elevator | |
//var elevator2 = elevators[1]; // Let's use the first elevator | |
var pressedFloorNumbers = []; | |
for (var i = 0; i < floors.length; i++) { | |
// Накапливаем информацию об этажах, на которых нажаты кнопки вверх или вниз | |
floors[i].on("up_button_pressed", function(floor) { |