Developers in the developing world typically don't use iPhones and Macbook pros. You can easily get a "good enough" machine for 10% of the price of a Macbook.
It won't be cheaper than in US either, more likely the opposite. My point wasn't specifically about Macbook, a lot of things are of the same price in every country. Buying home, local food or human services isn't one of them, but cars, electronics, branded food, clothes won't differ much.
A developer's primary tool is their intellect. Using an expensive Macbook or a particular programming language won't magically make a lousy developer into a good developer.
Note that all the hardware and software that were used to create the original internet or Unix or Emacs (dumb 80x24 CRT terminals hooked up to mainframes or mini-computers running low-level languages) were shitty tools by today's standards, yet amazing things were done with them by smart people.
What? For about $200 bucks you can buy an refurbished or pre-owned decent i5 desktop system. More than enough for JavaScript webdev. Heck, I guess I could use Raspberry PI and Vim for that