Skip to content
wolfram77 edited this page Mar 31, 2020 · 21 revisions

Counts the number of values.

Similar: index, indexRange, [size].

iterable.size(x, [i], [I]);
// x: an iterable
// i: start index (0)
// I: end index (end)
const iterable = require('extra-iterable');

var x = [2, 4, 6, 8];
iterable.size(x);
// 4

iterable.size(x, 1);
// 3

iterable.size(x, 1, 3);
// 2

references

Clone this wiki locally