- 1

Need help with office computers

So I need help with 7.2 office computers in js. So for case 1 I did this: var computers = 18 parseInt(readLine(), 10) console.log(computers * 2) and got it correct. But there are more that I have to do and I don’t know how to do the other ones with case 1. var computers = 18 parseInt(readLine(), 10) console.log(computers * 2) var computers = 20 console.log(computers * 2) I tried that but I got both of them wrong because I had two values. Can I get help?

20th Oct 2021, 2:27 PM
Epic Man
Epic Man - avatar
1 Antwort
+ 2
Epic Man , you shouldn't use certain values like 18 and 20. The idea is your code to be tested with different input values. So store the input in a variable => var computers = parseInt(readLine (), 10).
20th Oct 2021, 2:49 PM
TheWh¡teCat 🇧🇬
TheWh¡teCat 🇧🇬 - avatar