Refactoring old code

TLDRA colleague asked me to write an extension on an old codebase. The old code was using loops and wasn't really efficient with the tools we have nowadays. I decided to use the Map method to map the data into the desired format. The last thing we need is to have the array sorted based on the number variable.

•4m read time• From h.daily-dev-tips.com
Post cover image
Table of contents
Introducing the old code
7 Comments

Sort: