teman-teman, berikut ini cara me-reverse (membalikkan) suatu array di JQuery.

sintak:
.reverse()

Contoh:

Arr: <input id='Arr'> <br/>
ArrResv: <input id='ArrResv'>
var Arr = [9,7,3,1,6];

$('#Arr').val(Arr);

var ArrResv = Arr.reverse();

$('#ArrResv').val(ArrResv);

Demo: jsfiddle

terimakasih.

Related Posts

Leave a Reply

Your email address will not be published. Required fields are marked *