-
Notifications
You must be signed in to change notification settings - Fork 1
right
Subhajit Sahu edited this page Feb 3, 2021
·
18 revisions
Get values from right.
function right(x, n)
// x: an iterable
// n: number of values
const xiterable = require('extra-iterable');
var x = [1, 2, 3];
[...xiterable.right(x, 1)];
// → [3]
[...xiterable.right(x, 2)];
// → [2, 3]