Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to reverse the array in typescript for the following data?

Tags:

arrays

reverse

0:"Both"
1:"Prepaid"
2:"Recoverable"

How to reverse the above array in typescript?

like image 358
Kritika Mehta Avatar asked Oct 16 '17 05:10

Kritika Mehta


1 Answers

As stated here:

yourArray.reverse() // will return reversed array

It is JS, but the method must be also in TS

like image 184
Mykola Shchetinin Avatar answered Nov 15 '22 08:11

Mykola Shchetinin