Emulate Python-like comprehensions in JavaScript and TypeScript for more expressive and concise array transformations.