Video Tag: While vs. For Loops in Javascript