- 1

Pages per minute test javascript - continuation of topic

in this case: https://www.sololearn.com/Discuss/2668040/pages-per-minute-test-javascript 2 questions: 1-st why we don't need to put (i + "<br />") in "console.log"? I understand that br / is responsible for that every number from output is written on a new line... 2nd question: why we have to write: ppm+=20 in the code? why simple ppm+20 won't work?

27th Aug 2021, 1:48 PM
Pawel
1 ответ
+ 4
Console is not document where you put html elements.( And console is block level start from new line) Ppm += 20 will make ppm a new variable that will be 20+ to old ppm value that will be used next time in loop. If you will you ppm+20 ppm will always be its initial value and you will get same result in all loops.
27th Aug 2021, 2:05 PM
Divya Mohan
Divya Mohan - avatar