# #CodeBeer Invertir una Matriz en JavaScript

Photo by [Razvan Horhat](https://unsplash.com/@liveauthentic?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText) on [Unsplash](/?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText)

En JavaScript hay un método llamado `reverse()` el cual nos permite invertir los elementos de un Array mutando el valor del mismo. Suponiendo que tenemos un Array `**a**` la cual contiene el valor **\[‘A’, ‘B’, ‘C’\]** aplicando este método el mismo quedaría invertido y cambiaría su orden al siguiente **\[‘C’, ‘B’, ‘A’\]**, esto se haría de la siguiente manera.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1648468971930/zFl4fUhk7.png)

Si preferís verlo en vídeo te dejo un vídeo que cree en Youtube explicando este ejemplo.

<iframe src="https://www.youtube.com/embed/qlYAJugf5QI?feature=oembed" width="700" height="393" frameborder="0" scrolling="no"></iframe>

### Si el articulo te gusto o te pareció interesante por favor ayúdame con 👏 🤓 Puedes seguirme en [Twitter](https://twitter.com/suarez__imanol) o encontrarme en [GitHub](https://github.com/FranciscoImanolSuarez) visitando mi sitio web.

[**Francisco Imanol Suarez on about.me**  
*I am a web developer, student, and photographer in Trelew, Argentina. Read my articles.*about.me](https://about.me/franciscoimanol "https://about.me/franciscoimanol")[](https://about.me/franciscoimanol)
