Advertisement
ohowell

Untitled

Apr 27th, 2015
193
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.49 KB | None | 0 0
  1. var forLoop = function() {
  2. for(var i = 10; i >= 0; i -= 2) {
  3. console.log(i);
  4. }
  5. };
  6. forLoop();
  7.  
  8. var whileLoop = function() {
  9. var whileCondition = 10
  10. while(whileCondition >= 0) {
  11. console.log(whileCondition);
  12. whileCondition -= 2
  13. }
  14. };
  15. whileLoop();
  16.  
  17. var doLoop = function() {
  18. doCondition = false
  19. do {
  20. console.log("Apparently I'm never going to have to use this.");
  21. } while(doCondition === true);
  22. };
  23. doLoop();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement