.parent { display: flex;}.child { flex: 1 0 auto;}
const timeoutId = setTimeout(() => console.log('Timeout'), 1000);clearTimeout(timeoutId);console.log('Done');
const weakMap = new WeakMap();let obj = { name: 'Test' };weakMap.set(obj, 'value');obj = null;console.log(weakMap.has(obj));
.container { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px;}
const nums = [1, 2, 3, 4];const doubled = nums.map(n => n * 2);nums.length = 0;console.log(doubled);
const obj = { x: 10, y: 20, z: 30 };const { x, ...rest } = obj;delete rest.y;console.log(obj.y, rest.z);
.card { background-image: url('image.jpg'); background-size: cover; background-position: center; background-repeat: no-repeat;}
const array = new Array(3);const filled = array.fill(0);const mapped = array.map(() => 1);console.log(filled[0], mapped[0]);
const btn = document.querySelector('.btn');btn.style.color = 'red';btn.style.fontSize = '20px';const styles = window.getComputedStyle(btn);console.log(styles.color);
.container { columns: 3; column-gap: 20px;}