const arr = ['a', 'b', 'c'];const iterator = arr.values();console.log(iterator.next().value, iterator.next().value);
.button { border: 2px solid blue; outline: 2px solid red; outline-offset: 5px;}
const btn = document.createElement('button');btn.textContent = 'Click';btn.onclick = () => console.log('A');btn.addEventListener('click', () => console.log('B'));
const arr = [1, 2, 3, 4, 5];const first = arr.shift();const last = arr.pop();console.log(first + last, arr.length);
.element { width: 300px; overflow-x: auto; white-space: nowrap;}
const text = '10';const num1 = +text;const num2 = Number(text);console.log(num1 === num2, typeof num1);
const date = new Date('2024-01-15');const day = date.getDay();const dayOfMonth = date.getDate();console.log(day, dayOfMonth);
.element { mix-blend-mode: multiply; background: red;}
const input = document.querySelector('input');const hasValue = input.value.length > 0;const isValid = input.checkValidity();console.log(typeof hasValue, typeof isValid);
const obj1 = { a: 1, b: 2 };const obj2 = { b: 3, c: 4 };const merged = { ...obj1, ...obj2 };console.log(merged.b, Object.keys(merged).length);