Would you like to clone this notebook?

When you clone a notebook you are able to make changes without affecting the original notebook.

Cancel

Fun JavaScript Workshop

node v6.17.1
version: 2.0.0
endpointsharetweet
// Problem: given an array of numbers, // multiply even values by a constant and print the result var numbers = [3, 2, 8] var constant = 2 // should output 4 16 // example solution using Array methods numbers.filter(x => x % 2 === 0).map(x => constant * x).forEach(x => console.log(x))
Loading…

no comments

    sign in to comment