JAVASCRIPT: Store Manager
In JavaScript course, under Core Objects > 44 Code Project. You need to write a store manager program wherein you need to increase the price (in an array) depending on user's input. So the user's input will increase each price in that array. I could say that I was able to get the logic behind it but the problem is, it is actually different to the expected output. Here's my program below: function main() { var increase = parseInt(readLine(), 10); var prices = [98.99, 15.2, 20, 1026]; //your code goes here for (var i = 0; i < prices.length; i++) { console.log(prices[i] + increase); } } Sample User Input: 9 My Output: 107.99 24.2 29 1035 Expected Output: [ 107.99, 24.2, 29, 1035 ] I can't seem to display it in a single line.