Skip to main content
AI Assist is now on Stack Overflow. Start a chat to get instant answers from across the network. Sign up to save and share your chats.

Timeline for Length of a JavaScript object

Current License: CC BY-SA 3.0

12 events
when toggle format what by license comment
May 9, 2020 at 9:46 comment added Sebastian Simon Also, how is writing a method “more efficient”?
May 9, 2020 at 9:45 comment added Sebastian Simon If you’re going to extend built-in prototypes or polyfill a property (i.e. monkey-patch), please do it correctly: for forward compatibility, check if the property exists first, then make the property non-enumerable so that the own keys of constructed objects aren’t polluted. For methods use actual methods. My recommendation: follow these examples which demonstrate how to add a method that behaves as closely as possible like built-in methods.
Oct 12, 2016 at 2:09 history edited Mystical CC BY-SA 3.0
+getter method
Sep 18, 2016 at 1:34 comment added Mystical It's because it shows how to make it as a function and a global object method (more object oriented and uses some form of encapsulation); however aeosynth's answer doesn't.
Sep 17, 2016 at 18:39 comment added Peter Mortensen How is this different from aeosynth's answer?
Sep 17, 2016 at 18:37 history edited Peter Mortensen CC BY-SA 3.0
Copy edited.
Sep 17, 2016 at 2:16 history edited Mystical CC BY-SA 3.0
edited body
Sep 17, 2016 at 2:09 history edited Mystical CC BY-SA 3.0
added 214 characters in body; added 56 characters in body; added 9 characters in body
Sep 17, 2016 at 2:03 review Late answers
Sep 17, 2016 at 2:05
Sep 17, 2016 at 2:01 history edited Mystical CC BY-SA 3.0
added 199 characters in body
Sep 17, 2016 at 1:53 history edited Mystical CC BY-SA 3.0
added 355 characters in body
Sep 17, 2016 at 1:48 history answered Mystical CC BY-SA 3.0