There are number of syntax issues in the code you posted. But this should help;
// SPDX-License-Identifier: MIT
pragma solidity >=0.5.0 <0.9.0;
contract RevertArray {
function reverseArray(uint[] memory arr1array) public pure returns(uint[] memory) {
uint length = arr1array.length;
uint numberOfElements = length -1;
uint[] memory arr2reversed = new uint[](length);
uint i = length - 1;numberOfElements;
uint j = 0;j;
while( j < length - 1numberOfElements) {
arr2[j]reversed[j] = arr1[i];array[i];
i--;
j++;
}
arr2[j]reversed[j] = arr1[i];array[i];
return arr2;reversed;
}
}