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

  • Home
  • SEARCH
  • 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 9152119
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T11:57:55+00:00 2026-06-17T11:57:55+00:00

Definitive JavaScript by David Flanagan makes a distinction between Objects and Primitives. He defines

  • 0

Definitive JavaScript by David Flanagan makes a distinction between Objects and Primitives.

He defines the primitives as Number, String, Boolean, Null, and Undefined, as does the standard.

However, would it be more accurate to define a primitive, as subset of object, i.e. to call them Primitive Objects.

Because they have their own methods and are complex entities.

Actual Question

Would Primitive Object be more accurate than Object when defining String, Boolean, and Number?

  • 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-17T11:57:56+00:00Added an answer on June 17, 2026 at 11:57 am

    Objects and primitives are distinct:

    typeof 42 === "number"             
    typeof new Number(42) === "object"
    new Number(42) !== 42
    

    However, when necessary, primitives are automatically wrapped by temporary objects, which can be automatically converted back into primitives:

    (42).toString() === "42"
    new Number(42) == 42
    new Number(42) + 1 === 43
    

    Especially in the context of the Java and C# programming languages, this sort of behavior is called autoboxing. As wrapper objects have some confusing characteristics, for example:

    Boolean(new Boolean(false)) === true
    

    it is good practice to avoid intentionally storing them in variables and instead use primitives whenever possible.

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

Sidebar

Related Questions

In book JavaScript: The Definitive Guide, 5th Edition by David Flanagan, says: before sending
I'm just reading JavaScript: The Definitive Guide by David Flanagan. I'm really enjoing and
I'm reading Javascript: the Definitive Reference , and it says on page 93: On
I have been learning the Definitive Guide of JavaScript.i got a question about the
I am reading JavaScript: The Definitive Guide, 6th edition, and in section 3.10.3 The
Whilst reading the Javascript: The Definitive Guide I was intrigued by the section Defining
Is anyone aware of a definitive list of areas of missing support for ECMAScript/JavaScript
Is there a definitive JavaScript method for checking whether or not a web page
I am reading Javascript The Definitive Guide. In this book, Events and Event handling,
When I read JavaScript The Definitive Guide, section 9.3, I encountered this: Class methods

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.