Home > shorts > Chain map() functions in JavaScript

Chain map() functions in JavaScript


You can chain map() functions in JavaScript

const langs = ["javaScript", "typeScipt"]
  .map(capitalize)
  .map(coolify);

// ["JavaScript is cool", "TypeScipt is cool"]

Check the demo here => CodePen

© 2021, Andrew Losseff