Home > Web Front-end > JS Tutorial > Javascript Object object study notes_basic knowledge

Javascript Object object study notes_basic knowledge

WBOY
Release: 2016-05-16 16:26:10
Original
1013 people have browsed it

Constructor
new Object()

new Object(value)

Parameters
value
Optional parameter that declares the original value (i.e. number, Boolean value or string) to be converted into a Number object, Boolean object or String object. This object is not supported by JavaScript versions prior to 1.1 and ECMAScript Vl.

Return value

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

Properties
constructor
A reference to a JavaScript function that is the object’s constructor

Method

1.hasOwnProperty( )
Checks whether an object has a locally defined (non-inherited) property with a specific name.

Copy code The code is as follows:





This is another way
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template