document.querySelector('.menu .menu-item:nth-child(' + index + ')');
Метод every() проверяет, удовлетворяют ли все элементы массива условию, заданному в передаваемой функции.
currentPipe.addEventListener('click', this.emojeClickHandler);
там еще такая строка есть. Нужно либо обернуть ее в стрелочную функцию, либо юзать bind, либо она должна быть стрелочной функцией и.т.д.console.log( 'pipe' , 'number= ' + this.randomPipe , ':' , 'emoji= ' , '' + this.randomAnimals)
вы методы randomPipe и randomAnimals забыли вызвать, нужно добавить скобки. var Msg = [1, 6, 4, 88];
function checkArray(arr) {
if (arr.includes(65)) {
console.warn(65);
}
}
Msg.push = function(e) {
Array.prototype.push.call(Msg, e);
checkArray(Msg);
};
$('a[href*="#"]').click(function() {
let id = $.attr(this, 'href');
if (id.length <= 1) { return; }
$page.animate({
scrollTop: $(id).offset().top
}, 400);
return false;
});
.block
each _, x in Array(13)
if x == 0
span Вася
.bottom-line
else if x == 6
span Петя
.bottom-line
else if x == 12
span Юра
.bottom-line
else
span
- for (var x=0; x<13; x++)
if x == 0
span Вася
.bottom-line
else if x == 6
span Петя
.bottom-line
else if x == 12
span Юра
.bottom-line
else
span