JSFiddle - React, Tailwind, and code Playground

JavaScript

const createFunctionWith = (x) => {
	return (param) => console.log(x, param) 
}

let a = [1,2,3].map(x => createFunctionWith(x));
console.log(a[1]("bebe"));