🌐
MDN Web Docs
developer.mozilla.org › en-US › docs › Web › JavaScript › Reference › Global_Objects › Object
Object - JavaScript | MDN
The Object type represents one of JavaScript's data types. It is used to store various keyed collections and more complex entities. Objects can be created using the Object() constructor or the object initializer / literal syntax.
🌐
W3Schools
w3schools.com › js › js_objects.asp
JavaScript Objects
Getters and setters allow you to define Object Accessors (Computed Properties). ... Coding fundamentals as a game. Bite-sized lessons and challenges. ... Ready to start your journey? Your streak is waiting. ... If you want to use W3Schools services as an educational institution, team or enterprise, send us an e-mail: sales@w3schools.com · If you want to report an error, or if you want to make a suggestion, send us an e-mail: help@w3schools.com · HTML Tutorial CSS Tutorial JavaScript Tutorial How To Tutorial SQL Tutorial Python Tutorial W3.CSS Tutorial Bootstrap Tutorial PHP Tutorial Java Tutorial C++ Tutorial jQuery Tutorial
Discussions

What is an object
An object is a data structure which is usually made up of key value pairs. An example of an object that you might see at an incredibly basic level is: { name: “Elon”, surname: “Musk” } The brackets indicate it’s an object, everything inside of it is the data. In this example you can identify the key as name and the value as Elon This concept is consistent across both JavaScript and especially React because after all, React is just a framework for building user interfaces in JavaScript! When we talk about the concept of parent and child, you need to understand that the way data is structured is often hierarchical. In React, we may have a component function that outputs some JSX. It might be a button, let’s say. Well, that button probably sits inside of a container or menu, right? So in this case the button is a child of that container or menu potentially. In regards to props, well, they’re short for properties and you’ve already seen them in the example above! name or surname could be considered properties, or props for short. In React, we often pass data through these component functions using props, and props are normally objects, much like you’ve seen above. In React, you may see an example like props.surname, that is just referring to our object above and referencing the surname property or key. Hope that helps :) More on reddit.com
🌐 r/learnjavascript
27
34
April 27, 2022
Optimizing JavaScript by using arrays instead of objects
To build off up someone else's response if you are transferring enough data for this to matter. I would suggest making the following function: const createNote = ([title,message,date])=>({ title, message, date }); Objects are just sooo much easier to deal with on the frontend and whatever speed up you would get on the frontend by reducing memory usage would pale in comparison to the cost of the extra function calls i( getTitle ). More on reddit.com
🌐 r/javascript
10
2
July 5, 2017
Looking for a good javascript object formatter that can be run in-browser
Ok so I found this: https://github.com/xpl/string.ify . Formatting seems to be ok - not a big fan of the lispy looking output, but it works. would be nice to find something with a little better output More on reddit.com
🌐 r/javascript
17
9
September 14, 2017
Which way is the best way to create objects in Javascript?
EDIT: This post has been published--refined and expanded--as a SitePoint article. https://www.sitepoint.com/javascript-object-creation-patterns-best-practises/ So, here's how things evolved. Simple objects. Obviously the simplest way to make an object in JavaScript is an object literal. var o = { x: 42, y: 3.14, f: function() {}, g: function() {} }; But there's a drawback. If you need to use the same type of object in other places, then you'll end up copy-pasting the object's structure and initialization. The fix... 2) Factory functions. Objects are created, initialized, and returned from functions. function thing() { return { x: 42, y: 3.14, f: function() {}, g: function() {} }; } var o = thing(); But there's a drawback. We're creating fresh copies of functions "f" and "g" with each object. It would be better if all "thing" objects could share just one copy of each function. (Note: JavaScript engines are heavily optimized, so this issue is less important today than it used to be.) The fix... 3) Delegating to prototypes. JavaScript makes it easy to delegate property accesses to other objects through what we call the prototype chain. var thingPrototype = { f: function() {}, g: function() {} }; function thing() { var o = Object.create(thingPrototype); o.x = 42; o.y = 3.14; return o; } var o = thing(); This is such a common pattern that the language has some built-in support. A prototype object is created automatically for each function. thing.prototype.f = function() {}; thing.prototype.g = function() {}; function thing() { var o = Object.create(thing.prototype); o.x = 42; o.y = 3.14; return o; } var o = thing(); But there's a drawback. This is going to result in some repetition. In the "thing" function, the first and last lines are going to be repeated almost verbatim in every such delegating-to-prototype-factory-function. The fix... 4) Consolidate the repetition. function create(func) { var o = Object.create(func.prototype); func.call(o); return o; } Thing.prototype.f = function() {}; Thing.prototype.g = function() {}; function Thing() { this.x = 42; this.y = 3.14; } var o = create(Thing); The repetitive lines from "thing" have been moved into "create" and made generic to operate on any such function. This too is such a common pattern that the language has some built-in support. The "create" function we defined is actually a rudimentary version of the "new" keyword. Thing.prototype.f = function() {}; Thing.prototype.g = function() {}; function Thing() { this.x = 42; this.y = 3.14; } var o = new Thing; We've now arrived at ES5 classes. They are object creation functions that delegate shared properties to a prototype object and rely on the new keyword to handle repetitive logic. But there's a drawback. It's verbose and ugly. And implementing the notion of inheritance is even more verbose and ugly. The fix... 5) ES6 classes. They offer a significantly cleaner syntax for doing the same thing. class Thing { constructor() { this.x = 42; this.y = 3.14; } f() {} g() {} } var o = new Thing; More on reddit.com
🌐 r/javascript
78
249
March 27, 2016
🌐
Mozilla
developer.mozilla.org › en-US › docs › Web › JavaScript › Guide › Working_with_objects
Working with objects - JavaScript | MDN
August 21, 2026 - JavaScript is designed on an object-based paradigm. An object is a collection of properties, and a property is an association between a name (or key) and a value. A property's value can be a function, in which case the property is known as a method.
🌐
GeeksforGeeks
geeksforgeeks.org › javascript › objects-in-javascript
Objects in JavaScript - GeeksforGeeks
Understanding objects in JavaScript is essential for effective programming. They enable you to create complex data structures and perform a variety of operations.
Published: January 16, 2026
🌐
YouTube
youtube.com › watch
Learn JavaScript OBJECTS in 7 minutes! 🧍 - YouTube
#JavaScript #tutorial #course // object = A collection of related properties and/or methods// Can represent real world objects (people, produc...
Published: November 14, 2023
🌐
MDN Web Docs
developer.mozilla.org › en-US › docs › Web › JavaScript › Reference › Global_Objects › Object › values
Object.values() - JavaScript | MDN
5 days ago - Object.values() returns an array whose elements are values of enumerable string-keyed properties found directly upon object. This is similar to accessing the values inside a for...in loop, except that a for...in loop enumerates properties in the prototype chain as well.
🌐
Reddit
reddit.com › r/learnjavascript › what is an object
r/learnjavascript on Reddit: What is an object
April 27, 2022 -

HEllo guys, so I'm learning JS and trying react but I can't grasp a good understanding of some of the, apparently, most important terms. One of them is Object, another one is parent/child components, since I seem to find different examples that aren't consistent, and it's especially difficult for me to understand the codeword this, because of the previously explained.

So, my questions are:

what IS an object in JS and what is an object in react?

How do I know what is a parent and what is a child?

How do I understand the "passing props" part of the code?

I'm doing the react turorial Tutorial: Intro to React – React (reactjs.org), and part of it is "passing props" but I just don't get how one component is taking value from another when I can't see any relation between them.

Edit: thank you, everyone, for your answers, I will keep trying to grasps the concepts I'm struggling with before proceeding with anything. An object is now much more clearer but I'm still struggling with the parent/child and the passing of props but I'll keep reading.

Find elsewhere
🌐
W3Schools
w3schools.com › js › js_object_intro.asp
JavaScript Objects Learning Path
Objects are variables that can store both values and functions.
🌐
Codecademy
codecademy.com › learn › game-dev-learn-javascript-objects › modules › game-dev-learn-javascript-objects › cheatsheet
Learn JavaScript: Objects: Learn JavaScript: Objects Cheatsheet | Codecademy
It uses a pair of curly braces ({}) with property names on the left-hand side of an assignment to extract values from objects. The number of variables can be less than the total properties of an object. ... The shorthand property name syntax in JavaScript allows creating objects without explicitly ...
🌐
Medium
medium.com › @developerObsessed › mastering-objects-in-javascript-71511ff8e00e
Mastering Objects in JavaScript. A Comprehensive Guide to Understanding… | by The Obsessed Developer | Medium
July 21, 2023 - Object cloning is a way to create a copy of an object so that any changes made to the copy do not affect the original object. In JavaScript, objects are reference types, and when you copy an object using the assignment operator (=), it creates ...
🌐
JavaScript.info
javascript.info › tutorial › the javascript language › objects: the basics
Objects
As we know from the chapter Data types, there are eight data types in JavaScript. Seven of them are called “primitive”, because their values contain only a single thing (be it a string or a number or whatever). In contrast, objects are used to store keyed collections of various data and more complex entities.
🌐
CodeHS
codehs.com › tutorial › ryan › basic-objects-in-javascript
Tutorial: Basic Objects in JavaScript | CodeHS
In this tutorial, we'll take a look at the basics of creating an object with properties and methods in JavaScript.
🌐
Medium
davitdvalashvili1996.medium.com › everything-you-need-to-know-about-objects-in-javascript-c94e413f8909
Everything You Need to Know About Objects in JavaScript | by DavitDvalashvili | Medium
May 19, 2024 - As explained, objects in JavaScript are core data structures comprising properties and methods. While methods are functions/actions an object can perform, properties are characteristics of an object such as its name and value.
🌐
Medium
medium.com › @happymishra66 › objects-in-javascript-2980a15e9e71
Objects in JavaScript. You can also read the article on Github | by Rupesh Mishra | Medium
March 19, 2023 - An object in JavaScript is a collection of key-value pairs. Each key-value pair is called as a property. A property can be a function, an array, an object itself or any primitive data type i.e. integer, string, etc.
🌐
MDN Web Docs
developer.mozilla.org › en-US › docs › Web › JavaScript › Reference › Global_Objects
Standard built-in objects - JavaScript | MDN
1 week ago - These objects represent and interact with structured data buffers and data coded using JavaScript Object Notation (JSON).
🌐
MDN Web Docs
developer.mozilla.org › en-US › docs › Learn_web_development › Core › Scripting › Object_basics
JavaScript object basics - Learn web development | MDN
3 weeks ago - Every time we've been working through an example that uses a built-in browser API or JavaScript object, we've been using objects, because such features are built using exactly the same kind of object structures that we've been looking at here, albeit more complex ones than in our own basic custom examples.
🌐
freeCodeCamp
freecodecamp.org › news › objects-in-javascript-for-beginners
Objects in JavaScript – A Beginner's Guide
November 19, 2024 - Unlike other data types, objects are capable of storing complex values. Because of this, JavaScript relies heavily on them.
🌐
TutorialsPoint
tutorialspoint.com › javascript › javascript_objects.htm
JavaScript - Objects Overview
The JavaScript object is a non-primitive data type that is used to store data as key-value pairs. The key-value pairs are often referred as properties. A key in a key-value pair, also called a "property name", is a string and value can be anything.
🌐
W3Schools
w3schools.com › js › js_datatypes_objects.asp
JavaScript Built-In Objects
JavaScript objects contains a collection of different properties.
🌐
W3Schools
w3schools.com › js › js_object_methods.asp
JavaScript Object Methods
You can add methods to objects by assigning a function to a property · What are JavaScript Objects? What are Object Properties? What is this in Objects? How to Display JavaScript Objects · What is an Object Constructor? JavaScript Object Definitions · JavaScript Object Advanced this ·