function max(list) {
return list.reduce((a, b) => a > b ? a : b);
}
function max(list) {
let max = list[0];
list.forEach(function(e) {
if (e > max) max = e;
});
return max;
}
var elems = $('div');
elems.each(function(index) {
setTimeout(() => $(this).click(), index * 5);
});
$(...).slideToggle({
complete: function() { твой код }
});
files.forEach(file => arhivator(file));
$(owl[i]).owlCarousel();
let owl = $(".owl-elem");
owl.each(function() {
$(this).owlCarousel();
});
let owl = documentQuerySelectorAll(".owl-elem");
for (let i = 0; i < owl.lenght; i++) {
$(owl[i]).owlCarousel();
}
<form>
<input type="text" name="otprav">
<button>Отправить</button>
</form
document.querySelector("form").addEventListener("submit", function(e) {
e.preventDefault();
const data = new FormData(this);
alert("Учи основы форм! \n MSG: " + data.get("otprav"));
});