JavascriptObject object learning note _ basic knowledge-js tutorial

Source: Internet
Author: User
Tags hasownproperty
This article mainly introduces JavascriptObject object learning notes. For more information, see Constructor
New Object ()

New Object (value)

Parameters
Value
Optional parameter. It declares the original value (that is, Number, Boolean, or String) of the Number object, Boolean object, or String object ). This object is not supported in versions earlier than JavaScript 1.1 and ECMAScript Vl.

Return Value

If the value parameter is not passed to the constructor, it returns a newly created Object instance. If the original value parameter is specified, the constructor will create and return the packaging object of the original value, that is, the Number object, Boolean object, or String object. When the Object () constructor is called as a function without the new operator, its behavior is the same as that when the new operator is used.

Attribute
Constructor
References A JavaScript function, which is an object constructor.

Method

1. hasOwnProperty ()
Check whether the object has a locally defined (non-inherited) attribute with a specific name.

The Code is as follows:


 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.