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 8713913
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T05:27:54+00:00 2026-06-13T05:27:54+00:00

While reading a book of JavaScript I read that all the attributes of Data

  • 0

While reading a book of JavaScript I read that

all the attributes of Data Properties defaults to true when “defined directly on an object”.

then after some description it again says that

“When you are using Object.defineProperty()”, the values for configurable, enumerable, and
writable default to false unless otherwise specified.

I guess, in first statement “defined directly on an object” means using dot operator or by object literal notation like this:

var obj = new Object();
obj.name = "Mahesh";

But is there any way to experiment to check what these attributes have been set to, after the property has been added to the object by either method?

  • 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-06-13T05:27:55+00:00Added an answer on June 13, 2026 at 5:27 am

    You can use getOwnPropertyDescriptor:

    > var desc = Object.getOwnPropertyDescriptor(obj, 'name');
    {"value":"Mahesh","writable":true,"enumerable":true,"configurable":true}
    

    desc will contain the the flags configurable and enumerable. If the property is a data descriptor (no get or set), desc will also contain value and the flag writable. If the property is an accessor descriptor, desc will also contain the get and set methods.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

While reading a book called Let us C I read that a function showbit()
I'm reading in my book, Elegant JavaScript, that null == true evaluates as false.
while I was reading a javascript book, I read the following sentence. The call
While reading a book about JavaScript I stumbled across an example: var names =
While reading this class BitmapFactory I noticed that almost all methods inside are static.
Today, while I was randomly reading the JavaScript patterns O'Reilly book, I found one
While reading a book, i came across this statement: The methods of an object
I'am novice in JS. While reading the book, I found that some examples do
Currently, I'm reading 'Object-Oriented JavaScript'. In addition, I've encountered a hiccup while carrying out
While reading a book on C#, I have come across code that uses the

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.