Created
January 5, 2021 11:42
-
-
Save zlatkov/ebe68eadc003bbba3c397047e24fea42 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') { | |
throw new TypeError('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