Get to know MDN better
This page was translated from English by the community. Learn more and join the MDN Web Docs community.
This feature is well established and works across many devices and browser versions. It’s been available across browsers since июль 2015 г..
Метод reverse() на месте обращает порядок следования элементов массива. Первый элемент массива становится последним, а последний — первым.
Нет.
Перевёрнутый массив
Метод reverse() на месте переставляет элементы массива, на котором он был вызван, изменяет массив и возвращает ссылку на него.
В следующем примере создаётся массив myArray, содержащий три элемента, а затем массив переворачивается.
| ECMAScript® 2027 Language Specification # sec-array.prototype.reverse |
Enable JavaScript to view this browser compatibility table.
This page was last modified on 17 февр. 2025 г. by MDN contributors.
Your blueprint for a better internet.
Visit Mozilla Corporation’s not-for-profit parent, the Mozilla Foundation.
Portions of this content are ©1998–2026 by individual mozilla.org contributors. Content available under a Creative Commons license.