I'm making an image slider so I want to get the width of the image so I can use translate and move the images when I use element.clientWidth or any property that can get the width sometimes working and sometimes not I don't know the reason
here is my code
const slideImages = document.querySelectorAll('.image-slider img');
let distanceToMove = slideImages[0].clientWidth;
when I log it in the console sometimes it bring me the DOM Object and others the tag itself