I am using materialize CSS to use it is Carousel component and I am trying to reinitialize it because it has a dynamic content but I am not sure if the destroy function is working or not and I don't know how to check if it working properly
why no one answering if my question is vague tell me I will clarify more
//these are global variables
elems;
instances;
//this is the first initiation of the Carousel
this.elems = document.querySelector('.carousel');
this.instances = M.Carousel.init(this.elems, this.options);
console.log("this is at first initiation");
console.log(this.elems);
console.log(this.instances);
//and in this segment i am trying to reinitiate it
this.instances.destroy();
console.log("this is at after using destroy function");
console.log(this.elems);
console.log(this.instances);
this.instances = M.Carousel.init(this.elems, this.options);
console.log("this is at after reinit function");
console.log(this.elems);
console.log(this.instances);
and here some screenshots of console logs as asked by @Sean Doherty