function enrollPost(post,callback){
    setTimeout(() => {
        posts.push(post);
        console.log("enrolled");
        callback()
    }, 0000);
}
//its used for the asynchronous operation that is we dont have to wait for code to complete its operation
its used for the asynchronous operation that is we dont have to wait for code to complete its operation
its used for the asynchronous operation that is we dont have to wait for code to complete its operation
function enrollPost(post,callback){
    setTimeout(() => {
        posts.push(post);
        console.log("enrolled");
        callback()
    }, 0000);
}
function enrollPost ( post , callback ) { setTimeout ( ( ) => { posts . push ( post ) ; console . log ( "enrolled" ) ; callback ( ) } , 0000 ) ; }
its used for the asynchronous operation that is we dont have to wait for code to complete its operation
its used for the asynchronous operation that is we dont have to wait for code to complete its operation