While Loop Structure Javascript Foreach Example