const currentObj = currentPassengers.find(item => item.PassengersId === passengerIdEdit)
currentObj.Name = dataName;
currentObj.Surname: dataSurname;
if (ids.length > 0) {
const filterName = ids.find((name) => name === item.name);
if (!item.name) {
state.push(false);
return;
}
if (filterName) {
this.isFilters = false;
state.push(filterName != null);
return;
}
state.push(false);
}
if (types.length > 0) {
const filter = types.find((type) => type === item.surname);
if (!item.surname) {
state.push(false);
return;
}
if (filter) {
this.isFilters = false;
state.push(filter != null);
return;
}
state.push(false);
}
function changeFileInput(e) {
const fr = new FileReader()
fr.onload = () => { this.img = fr.result };
fr.readAsDataURL(e.target.files[0])
}
class Favorite = {
constructor(opt) {
}
getState () {
return state = // // получаем в результате промиса
}
nyMethod () {
getState().then(state => {
console.log(state)
})
}
}
document.querySelector(".box").addEventListener("click", function(e) {
e.target.classList.toggle("red");
})