let currentChart;
let currentResponse;
const createChart = (response) => {
//Остальной код
}
const createChart = (response) => {
try
let currentChart;
let currentResponse;
((response) => {
//Очень много кода
})(response)
}
catch(e) {
console.log(e)
}