Read a JSON array of integers. Apply this pipeline using arrow functions: double every number → keep values greater than 5 → sum the remainder. Print the sum.
Input: one JSON array. Output: the final number.
Your program reads from stdin and prints to stdout.
Example 1
Input: [1,2,3,4]
Output: 14
Hints
Read a JSON array of integers. Apply this pipeline using arrow functions: double every number → keep values greater than 5 → sum the remainder. Print the sum.
Input: one JSON array. Output: the final number.
Your program reads from stdin and prints to stdout.
Example 1
Input: [1,2,3,4]
Output: 14
Hints