js como obter elemento csswidth

document.getElementById("id").getBoundingClientRect().width
//or
document.getElementById("id").style.width
//document.getElementById("id").getBoundingClientRect() - will return all css properties of the emelemnt
alws34