Конвертер валют

var euroRate = 74;
var dollarRate = 63;

var euroAmount = 500;
var dollarAmount = 2500;

var euro = euroAmount * euroRate;
var dollar = dollarAmount * dollarRate;

var rublesAmount = euro + dollar;
console.log(rublesAmount);

Ииииии…???

image

А почему не получилось в одной переменной
let rublesAmount = euroAmount * euroRate + dollarAmount * euroAmount; ?

let euroRate = 74;
let dollarRate = 63;

let euroAmount = 500;
let dollarAmount = 2500;

let rublesAmount = (euroRate * euroAmount) + (dollarRate * dollarAmount);
console.log(rublesAmount);