-
Notifications
You must be signed in to change notification settings - Fork 0
distance
SuperPhantomUser edited this page Jun 11, 2021
·
1 revision
The distance method returns the distance between 2 items, INCLUDING the second item.
Array types: 1d
Returns: integer
Arguments:
- array
- first item
- second item
Examples:
const array = ["a", "b", "c", "d"];
console.log(Arrays.distance(array, "a", "b"));
// Returns: 1const array = ["a", "b", "c", "d"];
console.log(Arrays.distance(array, "a", "d"));
// Returns: 3