Created
May 4, 2016 15:03
-
-
Save sethdorris/be179ee90be30f4358e655de0c1410f9 to your computer and use it in GitHub Desktop.
promise
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let promise = new Promise((resolve, reject) => { | |
let connected = ws.connect(); | |
resolve(connected); | |
}); | |
promise.then((data) = > { | |
console.log("Connected:", data) | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment