-
Notifications
You must be signed in to change notification settings - Fork 4
compute reverse
kgryte edited this page May 12, 2015
·
1 revision
Reverses an array
.
var arr = [ 1, 2, 3, 4 ];
var out = compute.reverse( arr );
// returns [ 4, 3, 2, 1 ]
By default, the input array
is mutated. To return a new array
, set the copy
option to true
.
var arr = [ 1, 2, 3, 4 ];
var out = compute.reverse( arr, {
'copy': true
});
// returns [ 4, 3, 2, 1 ];
console.log( arr === out );
// returns false
- Utilities
- Array Creation
- Sorting and Reshaping Arrays
- Special Functions
- Arithmetic
- Relational Operations
- Logical Operations
- Trigonometry
- Geometry
- Sets
- Discrete Mathematics
- Linear Algebra
- Statistics