r/javascript • • Sep 30 '19

Removed: /r/LearnJavascript Three Different Ways to Create Objects in JavaScript

https://medium.com/better-programming/three-different-ways-to-create-objects-in-javascript-d3595d693296
9 Upvotes

6 comments sorted by

8

u/[deleted] Sep 30 '19

What about Object.create?

0

u/noharashutosh Sep 30 '19

Yeah, that completely correct and there other ways of creating objects too but I have just discussed three of them...

0

u/[deleted] Sep 30 '19

[deleted]

1

u/papkn Sep 30 '19

Which is 1.5 - 2x faster than object literal :)

1

u/[deleted] Sep 30 '19

can someone tell me, is it the new keyword or the new operator.

1

u/nschubach Sep 30 '19

Yes? It's an operator and referred to as a keyword... why does it matter?

0

u/kenman Sep 30 '19

Hi /u/noharashutosh, this post was removed.

  • For help with your javascript, please post to /r/LearnJavascript instead of here.

  • For beginner content, please post to /r/LearnJavascript instead of here.

  • For framework- or library-specific help, please seek out the support community for that project.

  • For general webdev help, such as for HTML, CSS, etc., then you may want to try /r/html, /r/css, etc.; please note that they have their own rules and guidelines!


/r/javascript is for the discussion of javascript news, projects, and especially, code! However, the community has requested that we not include help and support content, and we ask that you respect that wish.

Thanks for your understanding, please see our guidelines for more info.