photo by Pat Whelen via unsplash.com


photo by Louis Reed via unsplash.com

photo by Ján Vlačuha via unsplash.com


photo by Erica Steeves via unsplash.com


photo via John Matychuk via unsplash.com


photo by Nik via unsplash.com


image by Michael Dziedzic via unsplash.com


photo by Emily Morter via Unsplash.com


photo by Jakob Owens via unsplash.com
1. let a = [1, 1, 2, 3, 3, 4, 5, 5]2. console.log(a.reduce((acc, val) => acc.includes(val) ? acc : [...acc, val], []))
// [1, 2, 3, 4, 5]


photo by Joshua Sortino via unsplash.com

David Polcari

Software Engineer located in Austin, Texas with six years of petroleum engineering experience working for an international oil and gas company.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store