0
Can some one tell me what is with this code because the outpur is NaN instead of the values,
function main() { var increase = parseInt(readLine(), 10); var prices = [98.99, 15.2, 20, 1026]; //your code goes here for ( let i = 0; i < prices.length; i ++){ prices[i] += increase; } for (let i = 0; i < prices.length; i++){ console.log (prices[i]) } } main();
2 Respostas
+ 2
To allow us to better troubleshoot, can you please add your code as per this instruction:
https://code.sololearn.com/Wek0V1MyIR2r/?ref=app
https://code.sololearn.com/W0uW3Wks8UBk/?ref=app
+ 1
Shah Faisal Clear for loop 2 and leave console.log outside loop1 brackets