const [first, second, ...rest] = [1, 2, 3, 4, 5];

console.log('first', first)
console.log('second', second)
console.log('rest', rest)

const article = {
  title: 'Cool article',
  claps: 10000000,
  author: {
    name: 'Juan'
  }
}

const { title, claps, author: { name }} = article

console.log('title', title)
console.log('claps', claps)
console.log('author name', name)
Run Pen

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

  1. https://codepen.io/livecodestream/pen/KKdEQYG