Is there a way to view calculation steps?


I’m going through various pages and tackling their exercises. One of my biggest challenges (after the syntax errors) is understanding where my codes breaks in the calculations.
For example. I’m currently trying to figure out how the second for loop is calculated. Any resources?

for(var count= 1; count<6; count++) {console.log(count)};
// 1

for(var count= 1; count<6; count++) {count};


if you are struggling that much, maybe don’t use shorthands:

for(var count= 1; count<6; count = count + 1)

and you can always add console.log(count); in the for loop body of the second loop if you want to see/visualize it? Seems a visualizer might also help you:


Where had you been all my life?! The visualizer is what I needed!


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.