JSFiddle - React, Tailwind, and code Playground

JavaScript

var a = 1;

window['test' + a] = function() {
    alert('test');    
}

test1();