Created
January 5, 2021 11:45
-
-
Save zlatkov/41735c0241787d5e6d15075a3afd9e1e to your computer and use it in GitHub Desktop.
This file contains hidden or 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
function foo(x) { | |
return new Promise((resolve, reject) => { | |
if (typeof x !== 'number') { | |
reject('x is not a number'); | |
} | |
resolve(x); | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment