I am a web consultant from Navi Mumbai. Mainly dealt with LAMP stack, now into Django and getting into Laravel and Cloud. Founder of nerul.in and gaali.in
Please don't. The last code can be small but is very difficult to be readen fast by anyone. Come back to that code in 3 months from now and you will see that you will need a couple of seconds to understand it.
The code must be easy to follow. The first refactor with async/await is perfect, stick with it.
Yes, I totally agree that #3 is difficult to read even for experienced JavaScript coders. I was just trying to give an example of how sometimes it's possible to condense code to just one line JavaScript. I am going through this tutorial on MERN full-stack by Stephen Grider and came across this.
Darlan Tódero ten Caten
Please don't. The last code can be small but is very difficult to be readen fast by anyone. Come back to that code in 3 months from now and you will see that you will need a couple of seconds to understand it.
The code must be easy to follow. The first refactor with async/await is perfect, stick with it.