skip to Main Content

Javascript – boundingBoxCollection length is 0

const { selectedButton } = this.state; var boundingBoxCollection = []; console.log(boundingBoxCollection.length); var boundingBoxes = document.querySelectorAll('.cropper-face'); console.log("I am ice"+boundingBoxes.length); if(boundingBoxes.length > 0){ boundingBoxes.forEach(elem => { if(!boundingBoxCollection.includes(elem)){ boundingBoxCollection.push(elem); } }); } my boundingBoxCollection is not updated fix this, I want my array…

VIEW QUESTION
Back To Top
Search