GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — javascript/objects/creation.md at master · ThinkLib/javascript

Expand file tree

/

creation.md

Copy path
More file actions
More file actions

Latest commit

 

History

History
History
19 lines (13 loc) · 330 Bytes
/

creation.md

Copy path

File metadata and controls

19 lines (13 loc) · 330 Bytes
Raw
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 recomended way.

  2. and object-oriented

    var object = new Object();

    Note: it's almost like Java.

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.