<button class="button-third">
<input type="text" class="input-third" />
X
</button>
document.querySelector(".button-third").addEventListener("click", (evt) => {
console.log("button click")
});
document.querySelector(".input-third").addEventListener("click", (evt) => {
evt.stopPropagation();
console.log("input click")
});
state.filter(name => name!== action.name),
state.filter(name => name.name!== action.name),
<script>
const LikeButton = e => {
e.target.classList.toggle('element-grid__like-button_active')
}
document.querySelector('.element-grid__like-button').addEventListener("click", LikeButton)
</script>
let guess = prompt();
let word = "cat";
let remain = word.length;
word.includes(guess) ? res.push(guess) : alert('no')
<source media="(min-width: 1200px)" srcset="img/photo-desktop.jpg 1x, img/photo-desktop-@2x.jpg 2x">
<source media="(min-width: 768px)" srcset="img/photo-tablet.jpg 1x, img/photo-tablet-@2x.jpg 2x">
number = pressPower()() ** n;
flex-grow: 1;
gulp.task('sass:watch', function () {
gulp.watch('./sass/**/*.scss', ['sass']);
});
gulp.task('sass:watch', function () {
gulp.watch('./sass/**/*.scss', gulp.series('sass'));
});
function fourOperations(a, b){
return [a + b, a - b, a * b, a / b];
}
const test = fourOperations(10, 5);
console.log(test); // [15, 5, 50, 2]
const views = function(){
return this.age + this.name;
},
passport = {
age: 13,
name: 'name'
},
passport2 = {
age: 14,
name: 'name1'
};
console.log(views.call(passport));
console.log(views.call(passport2));
class Passport {
constructor(age, name) {
this.age = age;
this.name = name;
}
views() {
return this.age + this.name;
}
}
const passport1 = new Passport(14, "name1");
const passport2 = new Passport(12, "name2");
console.log(passport1.views())
console.log(passport2.views())
Использование этого атрибута осуждается спецификацией HTML и его наличие приведет к невалидному коду.
<body style="margin-right: 20px; margin-left: 0; margin-top: 150px></body>
// Числовой тип
const typeNumber = 5;
// Строковый тип
const typeString = "Строка";
// Булевый тип
const typeBoolean = true
// Null
const typeNull = null;
// undefined
const typeUndefined = underfined;
// Symbol(новый тип в es6)
const typeSymbol = Symbol()