// var c = document.getElementById('gobl3').getBoundingClientRect();
var x[2] = "gobl3";
console.log(x[2]);
var d = document.getElementById(x[2]).getBoundingClientRect();
скрипты:1 Uncaught TypeError: Cannot read properties of null (reading 'getBoundingClientRect')