Promises in javascript

function lo()

{

console.log(“Loding…”);

}
function fakedownload(jatin){ 
    setTimeout(
        function(){
            let downloaddata="Important Data";
            jatin(downloaddata)
        },10000
    )
}
lo();
fakedownload(function jatin(data){
    console.log(data);
})

did not understant why we pass the function name in
this function fakedownload(jatin) please tell

You will get to understand for this once we pick up async-await and callbacks in next class

Although for your doubt here we are passing jatin as a argument in fake download which is function being called afterwards with downloaddata as an argument later
Hence we are passing a function in fakedownload to be called with downloaddata
It acts a callback here