JSFiddle - React, Tailwind, and code Playground

JavaScript

var a = [1, 2, 3, 4, 5, 6];
y = map(a, function(i){return i*2;});
alert(y);