Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7190883
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T19:36:41+00:00 2026-05-28T19:36:41+00:00

Occasionally there is a JS framework or library that thinks it’s a really wise

  • 0

Occasionally there is a JS framework or library that thinks it’s a really wise idea to add some net new features to the prototype of Object or Array. I can’t find any more examples right now, but I do remember that I’ve had problems with that before. Of course, doing so breaks the good old for(...in...) loop, because suddenly those properties are now enumerated too. To get around it you have to check every enumerated property with .hasOwnProperty() before accessing. Which is cumbersome, when trying to write robust code.

So I got wondering – is there some way that I could make my own objects so, that they don’t inherit from Object? Initial playing around with .prototype yielded no results. Perhaps there is some trick to it? Or will everything always inherit from Object and there’s nothing I can do about it?

Added: I guess I should have noted that I want it for client-scripts in browsers, and compatibility should include IE6, or at least IE7. Other browser version requirements are more lenient, though the more the better, of course. (Yes, sadly, the corporate world still lives in IE-world…)

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T19:36:42+00:00Added an answer on May 28, 2026 at 7:36 pm

    In ECMAScript 5 you can pass null to Object.create:

    > obj = Object.create(null);
      Object
        No Properties
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Occasionally I will know that there is a .NET Framework function that returns a
I am getting ORA-02049 occasionally for some long-running and/or intensive transactions. There is seemingly
Occasionally, I've come across a webpage that tries to pop open a new window
I occasionally do some mysql development. Is there a repository somewhere where people have
Occasionally there will be a method that calls another method and does nothing else.
I've got some tracing statements with timestamps on an ASP.Net IIS application that gets
I've been working in .NET for some time now, but occasionally I still get
I have a occasionally connected application where there is a server that stores information
I'm developing a html5/javascript site and there is a page that occasionally crashes Safari
Occasionally while attempting to save a Crystal Report that I'm working on in VS2008,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.