// Here push function is not working
    var durations = []
    files.forEach(doc => {
        getVideoDurationInSeconds(`uploads/skill1/${doc}`).then((duration) => {
            
            durations.push(duration)    // Here push fuction is not working 
        })
        
        
    });
    console.log(durations)
// Here Push function is working
    var durations = []
    files.forEach(doc => {
        getVideoDurationInSeconds(`uploads/skill1/${doc}`).then((duration) => {
            
        })
        
        durations.push(doc)    // Here push fuction is working 
        
    });
    console.log(durations)
I want to store the duration of videos in array, i am getting all the duration of videos but not able to push in array. I am using nodejs and get-video-duration package