- Notifications
You must be signed in to change notification settings - Fork 1
push
Subhajit Sahu edited this page Feb 3, 2021 · 20 revisions
Add values to the end.
function push(x, ...vs) // x: an iterable // vs: values to addconst xiterable = require('extra-iterable'); var x = [1, 2]; [...xiterable.push(x, 3)]; // → [1, 2, 3] [...xiterable.push(x, 3, 4)]; // → [1, 2, 3, 4]