@svizzle/dev/log/iterable-array

Methods

(static) tapAppendTo(iterable, any) → {array}

Source:
Since:
  • 0.3.0

Print the provided array and element and return the result of appending the element to the array

Example
> tapAppendTo([1, 2, 3], 4)
[1, 2, 3] // logged
4 // logged
[1, 2, 3, 4]

> tapAppendTo('abc', {a: 1})
'abc' // logged
{a: 1} // logged
['a', 'b', 'c', {a: 1}]
Parameters:
Name Type Description
iterable iterable
any *
Returns:
  • @sideEffects: console.log
Type
array