Skip to content

Instantly share code, notes, and snippets.

@nikshinde-7
Created September 23, 2022 12:34
Show Gist options
  • Save nikshinde-7/9bc306da32d301f61e52ab55dc696534 to your computer and use it in GitHub Desktop.
Save nikshinde-7/9bc306da32d301f61e52ab55dc696534 to your computer and use it in GitHub Desktop.
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