Open
Description
To the novice or to someone who's been using JavaScript for a while but isn't yet up-to-speed with promises and async/await, it would be helpful for us to answer these questions:
- Why didn't I have to use
await
beforeipfs.dag.put()
in one lesson but I do in another? (The answer has to do with the fact that ipfs.dag.put() and ipfs.dag.get() are actually returning promises, which we haven't mentioned anywhere, so to oversimplify, if you are going to need to do something with that value later, you need theawait
.) - What's going on with this big
run
aysnc function wrapped around the code I'm writing? - When you tell me to return something, do I add something inside of that run function or replace
return run
withreturn myThing
?
We need to decide what form this should take and where it should live. Is it a lesson within the first workshop? Is it a separate page we link to from multiple workshops?
This is essentially JavaScript info, not IPFS info, so we don't want to consume too much space with it, but we need to acknowledge that it causes a bit of confusion as the user progresses through exercises.
cc @mikeal