Guest User

Untitled

a guest
Sep 6th, 2015
131
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. var getAllTrackIDs = new Promise(function(resolve, reject) {
  2.     var trackIDs = [];
  3.     /* Code to get trackIDs from HTML elements and add to array */
  4.     if(trackIDs != 0) {
  5.         resolve(trackIDs);
  6.     }
  7.     else {
  8.         reject(Error("No trackIDs found"));
  9.     }
  10. });
  11.  
  12. var generateTracks = new Promise(function(resolve, reject) {
  13.     var tracks = [];
  14.     /* Code to generate tracks from TrackIDs and add to array */
  15.     if(tracks != 0) {
  16.         resolve(tracks);
  17.     }
  18.     else {
  19.         reject(Error("Unable to generate tracks");
  20.     }
  21. });
  22.  
  23. getAllTrackIDs.then(generateTracks, function(message) {
  24.     console.error(response);
  25. }).then(function(response) {
  26.     console.log("Done.");
  27. }, function(response) {
  28.     console.error(response);
  29. });
RAW Paste Data

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing Pastebin.com from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add Pastebin.com to your ad blocker whitelist or disable your adblocking software.

×