Files
30-seconds-of-code/snippets_archive/pipeLog.md
Angelos Chalaris 611729214a Snippet format update
To match the starter (for the migration)
2019-08-13 10:29:12 +03:00

280 B

title, tags
title tags
pipeLog utility,beginner

Logs a value and returns it.

Use console.log to log the supplied value, combined with the || operator to return it.

const pipeLog = data => console.log(data) || data;
pipeLog(1); // logs `1` and returns `1`