You don't NEED a MacBook.
I often get the question "Everybody on Twitter is using a MacBook. Should I save for a MacBook to get started with coding?"
You can code on Windows, Linux and Mac. Use what you already own or what fits your budget & goals. You'll be fine.