. 1 < Script > 2 . 3 // function expression (Immediately-invoked function expression, IIFE ) immediate execution is also called self-executing function. . 4 . 5 // most common writing a: . 6 // (function foo () { . 7 // the console.log ( 'foo') . 8 // }) () . 9 10 // most common writing II: 11 // (function bar () { 12 is // the console.log ( 'bar') 13 is // } ()) 14 15 // two wording not used: 16 // + Fun function () { . 17 // console.log('fun') 18 // }() 19 20 -function xxx () { 21 console.log('xxx') 22 }() 23 24 </script>