Answers for "ways to reverse array"

PHP
1

reverse array

#The original array
arr = [11, 22, 33, 44, 55]
print("Array is :",arr)
 
res = arr[::-1] #reversing using list slicing
print("Resultant new reversed array:",res)
Posted by: Guest on October-08-2021

Code answers related to "ways to reverse array"

Browse Popular Code Answers by Language