JavaScript
- 3 ответа
- 0 вопросов
2
Вклад в тег
validationButtonForme(titleCard, linkImage, popupButtonAdd);
() => {
if (inputOne.value.length && inputTwo.value.length) {
enbableButton(button2);
} else {
disabledButton(button2);
}
}
validationButtonForme(titleCard, linkImage, popupButtonAdd)();
const randomMix = array => {
const mixer = (arr, res = []) => {
if (arr.length === 0) return res;
const randomIndex = Math.floor(Math.random() * arr.length);
const newRes = arr.splice(randomIndex, 1)
return mixer(arr, [...res, ...newRes])
}
return array.map(arr => mixer(arr))
}