I am trying to get the first and last item in array and display them in an object.
What i did is that I use the first and last function and then assign the first ite
well, I have another idea... for ex.:
const all = ['food', 'clean', 'cat', 'shower', 'work out'] console.log(`you have ${all.length} all!`) console.log(`Todo: ${all[0]}`) console.log(`Todo: ${all[all.length - 1]}`)