var funcName = 'sum'
function sum () {
}
var funcName = "sum";
window[funcName] = function () {
console.log(1 + 2);
};
window.sum();
var a = "sum";
globalThis[a] = function () {
console.log(1 + 3);
};
sum();
var a = "sum";
window[a] = function () {
console.log(1 + 4);
};
sum();