JSFiddle - React, Tailwind, and code Playground JavaScript var id = '2'; function map2() { alert('me called'); } window["map"+id]();