HTML Diff
0 added 0 removed
Original 2026-01-01
Modified 2026-03-09
1 <ul><li>script.js</li>
1 <ul><li>script.js</li>
2 </ul><p>JavaScript</p>
2 </ul><p>JavaScript</p>
3 <p>var calculateMiles = function (distance, isBusinessClass) { if (isBusinessClass) { return distance * 0.22; } else { return distance * 0.18; } };</p>
3 <p>var calculateMiles = function (distance, isBusinessClass) { if (isBusinessClass) { return distance * 0.22; } else { return distance * 0.18; } };</p>
4 <p>Thanks! We’ll fix everything at once!</p>
4 <p>Thanks! We’ll fix everything at once!</p>
5 <h2>Result</h2>
5 <h2>Result</h2>
6 <ol><li>After defining the function, create variable milesEconom, which is equal to the result of the expression calculateMiles(3000, false);.</li>
6 <ol><li>After defining the function, create variable milesEconom, which is equal to the result of the expression calculateMiles(3000, false);.</li>
7 <li>Create another variable milesBusiness, which is equal to the result of calculateMiles(3000, true);.</li>
7 <li>Create another variable milesBusiness, which is equal to the result of calculateMiles(3000, true);.</li>
8 <li>Log the following message in the console'With economy class from MuffAir, you’ll get ' + milesEconom + ' miles'.</li>
8 <li>Log the following message in the console'With economy class from MuffAir, you’ll get ' + milesEconom + ' miles'.</li>
9 <li>And then log this message in the console 'With business class of MuffAir, you’ll get ' + milesBusiness + ' miles'.</li>
9 <li>And then log this message in the console 'With business class of MuffAir, you’ll get ' + milesBusiness + ' miles'.</li>
10 </ol>
10 </ol>