.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;}
const arr = [1, 2, 3];const result = arr.reduceRight((acc, val) => acc + val, 0);console.log(result);
const promise = Promise.reject('Error');promise.catch(err => console.log('Caught'));promise.catch(err => console.log('Again'));
.box { width: 100px; height: 100px; background: linear-gradient(45deg, #000 25%, transparent 25%); background-size: 20px 20px;}