https://asimzaidi.medium.com/simplifying-array-manipulation-with-javascripts-built-in-methods-6ff1e5be586c