dimanche 27 juin 2021

Import IIFE function from another file

I got a JS file from the server that contains an IIFE function and returns a function, my question is, How I can import it to my main JavaScript file and calling the returned function.

My IIFE file look like this:

var MyIIFE = function() {
    return function(i) {
      return i;
    }
}();

Thanks!




Aucun commentaire:

Enregistrer un commentaire