Skip to content

Commit 88e40f6

Browse files
author
Vamsi Krishna
committed
Added code to reverse Array
1 parent fa88817 commit 88e40f6

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

‎reverseArray.js‎

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
var arr = [34, 234, 567, 4];
2+
print(arr);
3+
var new_arr = arr.reverse();
4+
print(new_arr);
5+
6+
/*
7+
Output:
8+
9+
34, 234, 567, 4
10+
4, 567, 234, 34
11+
12+
*/

0 commit comments

Comments
 (0)