- script.js
JavaScript
// Copy the whole code below
var percent = 0.25;
var distance = 4125;
if (distance > 10500) {
percent = 0.35;
}
var miles = distance * percent;
console.log('We’ll get ' + miles + ' miles for the flight to Irkutsk');
// Paste the code after this comment
Result
Goalscompleted
- Copy the entire code written before and paste it into the editor after the existing code.
- Change the second message in the console to
'We’ll get ' + miles + ' miles for the flight to Kamchatka'
. - Set value
11000
to the second variabledistance
.
Comments