Skip to main content
Code Cinema
JavaScript

Transform arrays with callbacks. Watch each element react.

let nums = [1, 2, 3, 4, 5]; nums.map(x => x * 2); nums.filter(x => x > 2);
Click here and start typing...
Higher-order functions — transform arrays
Type the first line to create the array...