- 1

What's wrong with this code? I cant understand

function main() { var amount = parseFloat(readLine(), 10); var rate = parseFloat(readLine(), 10); function convert(amount, rate); var convert =amount*rate; return convert; convert(amount,rate) console.log(convert(amount,rate) }

9th Oct 2021, 2:45 AM
Mirasol Sontousidad
Mirasol Sontousidad - avatar
1 Odpowiedź
- 1
After return convert; you have added two lines that won't be executed. Remove them from the function and put them after the function.
9th Oct 2021, 3:10 AM
Kashyap Kumar
Kashyap Kumar - avatar