({{, (RefLink[Reverse, paclet:ref/Reverse])[expr]
reverses the order of the elements in expr. }, {, (RefLink[Reverse, paclet:ref/Reverse])[expr,n]
reverses elements at level n in expr.}, {, (RefLink[Reverse, paclet:ref/Reverse])[expr,{(Subscript[n, 1]),(Subscript[n, 2]),…}]
reverses elements at levels (Subscript[n, 1]), (Subscript[n, 2]), … in expr.}})

OpenersNotesSection(Spacer1)Details

(RefLink[Reverse, paclet:ref/Reverse]) works on (RefLink[SparseArray, paclet:ref/SparseArray]) objects, reversing the elements in the corresponding ordinary array.

(RefLink[Reverse, paclet:ref/Reverse])[expr] is equivalent to (RefLink[Reverse, paclet:ref/Reverse])[expr,1].

For a matrix m, (RefLink[Reverse, paclet:ref/Reverse])[m] reverses the order of the rows, and (RefLink[Reverse, paclet:ref/Reverse])[m,2] reverses the order of the columns.

OpenersPrimaryExamplesSection(Spacer1)Examples  (8)

OpenersExampleSection0(Spacer1)Basic Examples  (3)

Reverse[{a,b,c,d}]

Reverse an (RefLink[Association, paclet:ref/Association]):

Reverse[<|a->1,b->2,c->2|>]

Reverse an (RefLink[Association, paclet:ref/Association]) on the first and second levels:

Reverse[<|a:>{1,2},b->{3,4},c->{5,6}|>,{1,2}]

OpenersExampleSection1(Spacer1)Generalizations & Extensions  (1)

(RefLink[Reverse, paclet:ref/Reverse]) works with heads other than (RefLink[List, paclet:ref/List]):

Reverse[f[a,b,c]]

OpenersExampleSection2(Spacer1)Applications  (3)

(RefLink[Reverse, paclet:ref/Reverse]) sublists:

Map[Reverse,{{a,b,c},{d,e,f}}]

(RefLink[Reverse, paclet:ref/Reverse]) operands:

Reverse[a.b.c.d.e]

Turn an array plot upside down:

ArrayPlot[Reverse[CellularAutomaton[30,{{1},0},20]]]

OpenersExampleSection3(Spacer1)Properties & Relations  (1)

(RefLink[Reverse, paclet:ref/Reverse]) is its own inverse:

Reverse[Reverse[{a,b,c,d}]]

({{DocumentationFooterIconsRelatedFunction.png, ({{See Also}, {(RefLink[Permutations, paclet:ref/Permutations])  ▪  (RefLink[RotateLeft, paclet:ref/RotateLeft])  ▪  (RefLink[RotateRight, paclet:ref/RotateRight])  ▪  (RefLink[StringReverse, paclet:ref/StringReverse])  ▪  (RefLink[IntegerReverse, paclet:ref/IntegerReverse])  ▪  (RefLink[PalindromeQ, paclet:ref/PalindromeQ])  ▪  (RefLink[Transpose, paclet:ref/Transpose])  ▪  (RefLink[ImageReflect, paclet:ref/ImageReflect])  ▪  (RefLink[ReverseSort, paclet:ref/ReverseSort])  ▪  (RefLink[DataReversed, paclet:ref/DataReversed])}})}})

({{DocumentationFooterIconsRelatedTutorial.png, ({{Tutorials}, {▪(RefLinkPlain[Rearranging Lists, paclet:tutorial/RearrangingLists])}})}})

({{DocumentationFooterIconsRelatedGuide.png, ({{Related Guides}, {▪(RefLinkPlain[Parts of Matrices, paclet:guide/PartsOfMatrices])}, {▪(RefLinkPlain[Rearranging & Restructuring Lists, paclet:guide/RearrangingAndRestructuringLists])}, {▪(RefLinkPlain[List Manipulation, paclet:guide/ListManipulation])}, {▪(RefLinkPlain[Structural Operations on Expressions, paclet:guide/StructuralOperationsOnExpressions])}})}})

({{(Spacer1), ({{(Spacer1)Related Links}, {(WebLink[DocumentationFooterIconsRelatedLinks-EIWL.png(Spacer1)An Elementary Introduction to the Wolfram Language, https://www.wolfram.com/language/elementary-introduction/03-first-look-at-lists.html])(WebLink[: First Look at Lists, https://www.wolfram.com/language/elementary-introduction/03-first-look-at-lists.html])}, {(WebLink[DocumentationFooterIconsRelatedLinks-EIWL.png(Spacer1)An Elementary Introduction to the Wolfram Language, https://www.wolfram.com/language/elementary-introduction/25-ways-to-apply-functions.html])(WebLink[: Ways to Apply Functions, https://www.wolfram.com/language/elementary-introduction/25-ways-to-apply-functions.html])}, {(WebLink[DocumentationFooterIconsRelatedLinks-EIWL.png(Spacer1)An Elementary Introduction to the Wolfram Language, https://www.wolfram.com/language/elementary-introduction/46-writing-good-code.html])(WebLink[: Writing Good Code, https://www.wolfram.com/language/elementary-introduction/46-writing-good-code.html])}})}})