I have some bars that are filled with a height %, but right when the page loads I would like all the bars to fill up and then decrease to 0. I know how to fill it up with a for
You can do it all in one loop:
for(var i = 0; i <= 200; i++) { var height = (i <=100) ? i : 200 - i; }
The variable height will go from 0 to 100 and then back to 0.
height