es6 self invoking function code example Example: self invoking function javascript es6 (() => { console.log('Ok'); })()