Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

JavaScript

How can a Promise be an object when JS classes are just syntactic sugar?

JavaScript has no real classes, but MDN refer to promises as objects. Did I miss something?

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise/resolve "The Promise.resolve() method returns a Promise object"

1 Answer

Everything in JavaScript is an object! Here's really quick read on it: https://gomakethings.com/everything-is-an-object-in-javascript/

Thank you. I was confused about the way objects can be created with the 'class' keyword. Need to experiment and read more so the 'quarters fall into place' (as we say in Holland).