JavaScript Interview Prep Practice Problems Part 1

Part 2 An IIFE (Immediately Invoked Function Expression) is a JavaScript function that runs as soon as it is defined. (function doubleNumber(num) { return num * 2; })(10); (function () { function getTotal(a, b) { return a + b; } var $ = 'currency'; if (true) console.log('hello world'); })(); Create 5