Vanilla JavaScript Module Project: How to pass an array from child.js file to parent.js file

Array get`s updated often and I will have to make the updated array copy available to use in the parent component.

The key here is I was asked not to use the set Interval.

Is there any way to achieve this ? My project is a Vanilla JavaScript module type.

parent file say index.js and child file is main.js.

trying to get the array copied/cloned from main.js to index.js