Strange Javascript: Promises and Prototypes

I recently wrote a blog about testing asynchronous functions in Javascript. I recalled how in my learning to code, the first time I encountered asynchronous functions was when writing a fetch request. That experience also introduced me to the idea of a javascript promise. Today I want to talk about one of those weird javascript interactions you might find yourself in while coding with promises.

The Promise object represents the eventual completion (or failure) of an asynchronous operation and its resulting value (MDN page here). Promises are always…