= settings.find(function () {
const param = "background_image_top";
if (settings[0].key === param) {
console.log(typeof settings[0].value)
} else if (settings[1].key === param){
console.log(typeof settings[1].value)
} else if (settings[2].key === param){
console.log(typeof settings[2].value)
} else if (settings[3].key === param) {
console.log(typeof settings[3].value)
}
});
console.log(hay);
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find
это просто прекрасно😁
Обсуждают сегодня