This question already has an answer here:

Should submissions written in JS that return a promise be allowed?

For example:


Doesn't output "hi", but outputs a promise that resolves with the value of "hi". If you want "hi", then


is needed. Should the .then(console.log) part be required (and therefore part of the byte count)?


marked as duplicate by Mego, Rɪᴋᴇʀ, Shaggy, a spaghetto, Wheat Wizard May 10 '17 at 17:42

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • \$\begingroup\$ You might want to clarify what a promise is. \$\endgroup\$ – Dennis May 10 '17 at 17:26

No byte penalty

This is just an (abnormal) way of output that can show up often in fetch / submissions. I think this is absolutely fine.

  • \$\begingroup\$ In the future, please don't post answers for both sides. Let the people who actually support a side post an answer for it. Also, you don't need to make the answers community wiki. (you can, it's just not needed) \$\endgroup\$ – Rɪᴋᴇʀ May 10 '17 at 17:32

Not the answer you're looking for? Browse other questions tagged .