+ 1

my code isn't working for some reason

in the javascript-intermediate course, exactly at the code project "Store Manager", the app tells me that my code is wrong even though it is correct here is the code ==> 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 } console.log(prices) } main() _____the code output is NaN, you may think that the variable increase is a string but it is also a number, I checked with the typeof method I hope someone replies___

9th Jun 2024, 6:57 PM
Adam ELFARISSI
Adam ELFARISSI - avatar
2 ответов
+ 5
remove the last line: main()
9th Jun 2024, 7:21 PM
Lisa
Lisa - avatar
0
Give us a link of your code
11th Jun 2024, 8:43 AM
Vivan
Vivan - avatar