Guest User

Untitled

a guest
Oct 22nd, 2018
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.66 KB | None | 0 0
  1. var also_upper_classmen, city, citystate, elementary_school, geoLocate, grades, high_ends, high_school, high_starts, location, middle_ends, middle_school, middle_starts, non_graduates, not_seniors, open_warehouses, primary_ends, primary_starts, store_locations, upper_classmen, warehouse_city_country, warehouse_locations, _i, _j, _k, _l, _len, _len1, _len2, _len3, _len4, _len5, _len6, _m, _n, _o, _p, _q, _r, _results, _results1, _results2;
  2.  
  3. grades = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12];
  4.  
  5. non_graduates = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11];
  6.  
  7. primary_starts = 1;
  8.  
  9. primary_ends = 5;
  10.  
  11. elementary_school = (function() {
  12. _results = [];
  13. for (var _i = primary_starts; primary_starts <= primary_ends ? _i <= primary_ends : _i >= primary_ends; primary_starts <= primary_ends ? _i++ : _i--){ _results.push(_i); }
  14. return _results;
  15. }).apply(this);
  16.  
  17. middle_starts = 6;
  18.  
  19. middle_ends = 8;
  20.  
  21. middle_school = (function() {
  22. _results1 = [];
  23. for (var _j = middle_starts; middle_starts <= middle_ends ? _j <= middle_ends : _j >= middle_ends; middle_starts <= middle_ends ? _j++ : _j--){ _results1.push(_j); }
  24. return _results1;
  25. }).apply(this);
  26.  
  27. high_starts = 9;
  28.  
  29. high_ends = 12;
  30.  
  31. high_school = (function() {
  32. _results2 = [];
  33. for (var _k = high_starts; high_starts <= high_ends ? _k <= high_ends : _k >= high_ends; high_starts <= high_ends ? _k++ : _k--){ _results2.push(_k); }
  34. return _results2;
  35. }).apply(this);
  36.  
  37. not_seniors = high_school.slice(0, 3);
  38.  
  39. upper_classmen = high_school.slice(2, high_school.length);
  40.  
  41. also_upper_classmen = high_school.slice(2);
  42.  
  43. upper_classmen.forEach(function(grade, index) {
  44. return alert("I'm an upper classmen in grade " + grade + "!");
  45. });
  46.  
  47. store_locations = ['Montreal', 'Tokyo', 'Paris', 'New York'];
  48.  
  49. warehouse_locations = ['Los Angeles', 'Atlanta', 'Miami', 'Seattle'];
  50.  
  51. store_locations.forEach(function(location, index) {
  52. return alert("Store is located in " + location);
  53. });
  54.  
  55. for (_l = 0, _len = warehouse_locations.length; _l < _len; _l++) {
  56. location = warehouse_locations[_l];
  57. alert("This product was shipped from " + location);
  58. }
  59.  
  60. for (_m = 0, _len1 = warehouse_locations.length; _m < _len1; _m++) {
  61. location = warehouse_locations[_m];
  62. alert("Product stored in " + location);
  63. }
  64.  
  65. for (_n = 0, _len2 = warehouse_locations.length; _n < _len2; _n++) {
  66. city = warehouse_locations[_n];
  67. warehouse_city_country = "" + city + ", USA";
  68. }
  69.  
  70. warehouse_locations = (function() {
  71. var _len3, _o, _results3;
  72. _results3 = [];
  73. for (_o = 0, _len3 = warehouse_locations.length; _o < _len3; _o++) {
  74. city = warehouse_locations[_o];
  75. _results3.push("" + city + ", USA");
  76. }
  77. return _results3;
  78. })();
  79.  
  80. for (_o = 0, _len3 = warehouse_locations.length; _o < _len3; _o++) {
  81. citystate = warehouse_locations[_o];
  82. alert("The product was shipped from " + citystate);
  83. }
  84.  
  85. geoLocate = function(location) {
  86. return alert("geoLocate says this warehouse is located in " + location);
  87. };
  88.  
  89. for (_p = 0, _len4 = warehouse_locations.length; _p < _len4; _p++) {
  90. location = warehouse_locations[_p];
  91. geoLocate(location);
  92. }
  93.  
  94. for (_q = 0, _len5 = warehouse_locations.length; _q < _len5; _q++) {
  95. location = warehouse_locations[_q];
  96. if (location !== "Los Angeles, USA" && location !== "Atlanta, USA") {
  97. geoLocate(location);
  98. }
  99. }
  100.  
  101. open_warehouses = (function() {
  102. var _len6, _r, _results3;
  103. _results3 = [];
  104. for (_r = 0, _len6 = warehouse_locations.length; _r < _len6; _r++) {
  105. location = warehouse_locations[_r];
  106. if (location !== "Los Angeles, USA" && location !== "Atlanta, USA") {
  107. _results3.push(location);
  108. }
  109. }
  110. return _results3;
  111. })();
  112.  
  113. for (_r = 0, _len6 = open_warehouses.length; _r < _len6; _r++) {
  114. location = open_warehouses[_r];
  115. alert("The warehouse is open in " + location);
  116. }
Add Comment
Please, Sign In to add comment