Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 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;
- grades = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12];
- non_graduates = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11];
- primary_starts = 1;
- primary_ends = 5;
- elementary_school = (function() {
- _results = [];
- for (var _i = primary_starts; primary_starts <= primary_ends ? _i <= primary_ends : _i >= primary_ends; primary_starts <= primary_ends ? _i++ : _i--){ _results.push(_i); }
- return _results;
- }).apply(this);
- middle_starts = 6;
- middle_ends = 8;
- middle_school = (function() {
- _results1 = [];
- for (var _j = middle_starts; middle_starts <= middle_ends ? _j <= middle_ends : _j >= middle_ends; middle_starts <= middle_ends ? _j++ : _j--){ _results1.push(_j); }
- return _results1;
- }).apply(this);
- high_starts = 9;
- high_ends = 12;
- high_school = (function() {
- _results2 = [];
- for (var _k = high_starts; high_starts <= high_ends ? _k <= high_ends : _k >= high_ends; high_starts <= high_ends ? _k++ : _k--){ _results2.push(_k); }
- return _results2;
- }).apply(this);
- not_seniors = high_school.slice(0, 3);
- upper_classmen = high_school.slice(2, high_school.length);
- also_upper_classmen = high_school.slice(2);
- upper_classmen.forEach(function(grade, index) {
- return alert("I'm an upper classmen in grade " + grade + "!");
- });
- store_locations = ['Montreal', 'Tokyo', 'Paris', 'New York'];
- warehouse_locations = ['Los Angeles', 'Atlanta', 'Miami', 'Seattle'];
- store_locations.forEach(function(location, index) {
- return alert("Store is located in " + location);
- });
- for (_l = 0, _len = warehouse_locations.length; _l < _len; _l++) {
- location = warehouse_locations[_l];
- alert("This product was shipped from " + location);
- }
- for (_m = 0, _len1 = warehouse_locations.length; _m < _len1; _m++) {
- location = warehouse_locations[_m];
- alert("Product stored in " + location);
- }
- for (_n = 0, _len2 = warehouse_locations.length; _n < _len2; _n++) {
- city = warehouse_locations[_n];
- warehouse_city_country = "" + city + ", USA";
- }
- warehouse_locations = (function() {
- var _len3, _o, _results3;
- _results3 = [];
- for (_o = 0, _len3 = warehouse_locations.length; _o < _len3; _o++) {
- city = warehouse_locations[_o];
- _results3.push("" + city + ", USA");
- }
- return _results3;
- })();
- for (_o = 0, _len3 = warehouse_locations.length; _o < _len3; _o++) {
- citystate = warehouse_locations[_o];
- alert("The product was shipped from " + citystate);
- }
- geoLocate = function(location) {
- return alert("geoLocate says this warehouse is located in " + location);
- };
- for (_p = 0, _len4 = warehouse_locations.length; _p < _len4; _p++) {
- location = warehouse_locations[_p];
- geoLocate(location);
- }
- for (_q = 0, _len5 = warehouse_locations.length; _q < _len5; _q++) {
- location = warehouse_locations[_q];
- if (location !== "Los Angeles, USA" && location !== "Atlanta, USA") {
- geoLocate(location);
- }
- }
- open_warehouses = (function() {
- var _len6, _r, _results3;
- _results3 = [];
- for (_r = 0, _len6 = warehouse_locations.length; _r < _len6; _r++) {
- location = warehouse_locations[_r];
- if (location !== "Los Angeles, USA" && location !== "Atlanta, USA") {
- _results3.push(location);
- }
- }
- return _results3;
- })();
- for (_r = 0, _len6 = open_warehouses.length; _r < _len6; _r++) {
- location = open_warehouses[_r];
- alert("The warehouse is open in " + location);
- }
Add Comment
Please, Sign In to add comment