Bit of practice with flatMap; I hadn't used it before - but I'm going to start now!
const faro = deck => deck
.slice(0, (deck.length / 2))
.flatMap((card, i) => [card, deck[i + (deck.length / 2)]])
arr = ['ace', 'two', 'three', 'four', 'five', 'six']
So I had the bright idea to do a screencast of me solving the problem and posting it on youtube... any feedback is welcome! And if it goes well, maybe I'll do more of them in the future :) We'll see! I haven't done youtube before, so this is my first video on there!
Nicely done on the video! Very clear, and nicely put together. :-)
We're a place where coders share, stay up-to-date and grow their careers.
We strive for transparency and don't collect excess data.