Created
September 23, 2022 12:34
-
-
Save nikshinde-7/9bc306da32d301f61e52ab55dc696534 to your computer and use it in GitHub Desktop.
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 = Promise.resolve(1); | |
let wrapInPromise = (x) => Promise.resolve(x); | |
const boxResult = await promise.then(wrapInPromise); | |
const wrapperResult = await wrapInPromise(value); | |
console.log(boxResult == wrapperResult); | |
// Should log as true ✅ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment