I'm learning javascript and I want to practice with this question's answers.
var brand = prompt('Car brand?')
var model = prompt('Car model?')
var tank = prompt('Aracin yakit deposu ne kadar?')
var fuelPrice = 7.60
var fuelPriceTotal = (tank * fuelPrice)
var automatic = prompt('Otomatik mi?')
console.log(brand + ' ' + model + ' ' + tank + ' ' + 'litre yakit deposuna sahip toplam yakit fulleme fiyati' + ' ' +
parseInt(fuelPriceTotal) + 'TL' + ' ' + 'Araç' + ' ' + automatic + 'tir')
My question is how can I make automatic part yes no question and if answer 'yes' then console writes x sentence else console writes y sentence? (english not my main language so dont over think string parts. just automatic part is main question.)
thanks.
I tried
if (automatic === 'yes') {
console.log('Write one')
} else (automatic === 'no'){
console.log('write number two')
}
Im pretty sure there is a bunch of problems here but I dont know what are those.