Pass parameter to IIFE in JavaScript. You can pass paramter to IIFEE functions as shown:
let k = 500;
(function(param){
console.log('Paramerter is ', param);
})(k);
// "Paramerter is ", 500
Pass parameter to IIFE in JavaScript. You can pass paramter to IIFEE functions as shown:
let k = 500;
(function(param){
console.log('Paramerter is ', param);
})(k);
// "Paramerter is ", 500