Posted By

qrist0ph on 06/14/09


Tagged

kontrollStrukturen


Versions (?)

Javascript Kontrollstukturen


 / Published in: JavaScript
 

  1. // define Array
  2. var myArray = new Array("eins","zwei","drei")
  3.  
  4. //for loop
  5. for (var i = 0; i <= myArray.length; i++){
  6.  
  7. }
  8.  
  9. //while loop
  10. while (input!= "ende" ) {
  11.  
  12. }
  13.  
  14. //for each loop
  15. for (var Eigenschaft in document){
  16.  
  17. }
  18.  
  19. //map array
  20. arr = jQuery.map(arr, function (a) { return a + a; });
  21.  
  22. //break and continues
  23. for (var element in myArray ){
  24. if(foo==3){
  25. break;
  26. }
  27. }

Report this snippet  

You need to login to post a comment.