Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Latest commit

 

History

History
History
20 lines (13 loc) · 322 Bytes

File metadata and controls

20 lines (13 loc) · 322 Bytes
Copy raw file
Download raw file
Edit and raw actions

Creation

There are two ways to create an object in JavaScript:

  1. literal

    var object = {};
    // Yes, simply a pair of curly braces!

    Note: this is the recommended way.

  2. and object-oriented

    var object = new Object();

    Note: it's almost like Java.

Morty Proxy This is a proxified and sanitized view of the page, visit original site.