About 13,700,000 results
Open links in new tab
  1. JavaScript Objects - W3Schools

    How to Define a JavaScript Object. Using an Object Literal; Using the new Keyword; Using an Object Constructor

  2. Working with objects - JavaScript | MDN - MDN Web Docs

    Apr 3, 2025 · To define an object type, create a function for the object type that specifies its name, properties, and methods. For example, suppose you want to create an object type for cars. …

  3. JavaScript Object Definition - W3Schools

    JavaScript Object Methods can be grouped into: The most common way to protect an object from being changed is by using the const keyword. With const you can not re-assign the object, but …

  4. Creating objects in JavaScript - GeeksforGeeks

    Aug 13, 2024 · Using object literals to create objects in JavaScript involves defining an object directly with key-value pairs inside curly braces {}. This method is concise and straightforward, …

  5. JavaScript object basics - Learn web development | MDN - MDN Web Docs

    Apr 11, 2025 · Basic syntax: Object literals, properties and methods, nesting objects and arrays in objects. Using constructors to create a new object. Object scope, and this. Accessing …

  6. Classes and Objects in JavaScript - GeeksforGeeks

    Apr 26, 2025 · Defining class methods in JavaScript is easy and simple, we just need to add () following a method name. constructor(var) { this.var = var; // defining method. method() { …

  7. JavaScript Create ObjectHow to Define Objects in JS

    Jul 20, 2020 · JavaScript offers two innovative ways of creating object-oriented objects. The first is using a prototype object to share the common behavior. Objects inherit from other objects. …

  8. Object - JavaScript | MDN - MDN Web Docs

    Apr 3, 2025 · Objects can be created using the Object() constructor or the object initializer / literal syntax. Nearly all objects in JavaScript are instances of Object; a typical object inherits …

  9. JavaScript Objects: Create Objects, Access Properties & Methods

    In JavaScript, an object can be created in two ways: 1) using Object Literal/Initializer Syntax 2) using the Object() Constructor function with the new keyword. Objects created using any of …

  10. Objects - The Modern JavaScript Tutorial

    Jun 19, 2022 · In JavaScript, objects penetrate almost every aspect of the language. So we must understand them first before going in-depth anywhere else. An object can be created with …

  11. Some results have been removed
Refresh