open_in_new
content_copy
const data = ['a', 'b', 'c', 'd'], [last] = data.slice(-1); console.log(last);