- script.js
JavaScript
var percent = 0.25;
var distance = 4125;
Result
Goalscompleted
- Calculate the number of miles using formula
distance * percentand write the result to variablemiles. - Log the result in the console:
console.log('We’ll get ' + miles + ' miles for the flight to Irkutsk');.
Comments