From 7c8e3472eccf6a655a0b748038c0595265e7bd77 Mon Sep 17 00:00:00 2001 From: Dan Ichim Date: Sun, 3 Nov 2024 01:34:34 +0200 Subject: [PATCH 1/6] Update day_03.md --- day_03.md | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/day_03.md b/day_03.md index ce0deb8..50eaa2b 100644 --- a/day_03.md +++ b/day_03.md @@ -2,17 +2,17 @@ ## DAY 3 -- Objects explained - - Objects, the big picture - - Syntax - - Object properties attributes (accessors, descriptors) - - Prototype - - Behavior Delegation - - Exotic Objects - - Object built-in methods - - Standard built-in objects - -## Objects, the big picture +- [Objects explained](#objects-explained) + - [Objects, the big picture](#objects-the-big-picture) + - [Syntax](#syntax) + - [Object properties attributes (accessors, descriptors)](#object-properties-attributes-accessors-descriptors) + - [Prototype](#prototype) + - [Behavior Delegation](#behavior-delegation) + - [Exotic Objects](#exotic-objects) + - [Object built-in methods](#object-built-in-methods) + - [Standard built-in objects](#standard-built-in-objects) + +## [Objects, the big picture](#objects-the-big-picture) First we went through an introduction of the language, then we jumped into the syntax, grammar and types where we realized that "not everything in javascript is an object!", Primitives are not objects and they're immutable! and we also noted Object type in JS has many flavors ( aka sub-types ), but ... what's an object? what can we do with them? what are they for? @@ -80,7 +80,7 @@ Great, now we know this: Are we done? ... not even close!!!!! There's still much to see! -## The syntax +## [The syntax](#syntax) In order to create a new object we can use 3 different syntax @@ -90,7 +90,7 @@ In order to create a new object we can use 3 different syntax Each form provides different characteristics but all will end up creating the same thing, a new object. I listed them in order, being the first the most common one and the third the least used. -## Properties +## [Properties](#object-properties-attributes-accessors-descriptors) As we saw before, properties come in two flavors which can be defined in terms of `descriptors`: `data descriptors` and `accessor descriptors`. @@ -131,7 +131,7 @@ function defineWithType (object, key, acceptType) { } ``` -## Prototype +## [Prototype](#prototype) Everybody talks about the **prototype chain** but what's that? @@ -156,11 +156,11 @@ Yes!! Let's go to [YDKJS: this & Object Prototypes - Chapter 5 - Prototypes](htt That's even better -## Behavior Delegation +## [Behavior Delegation](#behavior-delegation) Now let's take a look at one of the most powerful aspects of the prototype system. Let's get into Behavior Delegation, Kyle Simpson dedicated a full chapter for this on [YDKJS: this & Object Prototypes - Chapter 6 - Behavior Delegation](https://github.com/getify/You-Dont-Know-JS/blob/1st-ed/this%20%26%20object%20prototypes/ch6.md) -## Exotic Objects +## [Exotic Objects](#exotic-objects) We've learned that exotic objects are ones that do not have the default behavior for one or more of the essential internal methods that must be supported by all objects. But what does that mean? and what examples do we have? @@ -175,11 +175,11 @@ Let's check the spec Let's explore a simple one, [String Exotic Objects](http://www.ecma-international.org/ecma-262/6.0/#sec-string-exotic-objects). -### Object built-in methods +### [Object built-in methods](#object-built-in-methods) The default Object "constructor" comes with several utility methods, let's check'em [here](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object#Methods_of_the_Object_constructor). -### Standard built-in objects +### [Standard built-in objects](#standard-built-in-objects) Alright, objects everywhere, some of them come together with the language ( [built-in](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects) objects ) and some other are defined by the host application ( e.g [Web API](https://developer.mozilla.org/en-US/docs/Web/API) exposed by the browser ) @@ -192,4 +192,4 @@ Simply because `this` is not an object! and it's not about objects, it's about b *** [Go back to DAY 2](/day_02.md) or [Go next to DAY 4](/day_04.md) *** -[Back to main page](https://github.com/thinkb4/a-walk-in-javascript/tree/master#day-3) \ No newline at end of file +[Back to main page](https://github.com/thinkb4/a-walk-in-javascript/tree/master#day-3) From 2b241865cd0bf475d7945a0aa0906676d44fdbce Mon Sep 17 00:00:00 2001 From: Dan Ichim Date: Sun, 3 Nov 2024 01:36:55 +0200 Subject: [PATCH 2/6] Update day_03.md --- day_03.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/day_03.md b/day_03.md index 50eaa2b..a90a32a 100644 --- a/day_03.md +++ b/day_03.md @@ -5,7 +5,7 @@ - [Objects explained](#objects-explained) - [Objects, the big picture](#objects-the-big-picture) - [Syntax](#syntax) - - [Object properties attributes (accessors, descriptors)](#object-properties-attributes-accessors-descriptors) + - [Object properties attributes (accessors, descriptors)](#properties) - [Prototype](#prototype) - [Behavior Delegation](#behavior-delegation) - [Exotic Objects](#exotic-objects) @@ -90,7 +90,7 @@ In order to create a new object we can use 3 different syntax Each form provides different characteristics but all will end up creating the same thing, a new object. I listed them in order, being the first the most common one and the third the least used. -## [Properties](#object-properties-attributes-accessors-descriptors) +## [Properties](#properties) As we saw before, properties come in two flavors which can be defined in terms of `descriptors`: `data descriptors` and `accessor descriptors`. From e73224245e352b70f138ce437341e44b3687d3d9 Mon Sep 17 00:00:00 2001 From: Dan Ichim Date: Sun, 3 Nov 2024 01:40:19 +0200 Subject: [PATCH 3/6] Update nav day 3 --- README.md | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 1b2af55..f8729ea 100644 --- a/README.md +++ b/README.md @@ -63,15 +63,15 @@ Hopefully your walk will be much easier than mine! - [Spread/Rest](/day_02.md#the-case-of-the---spreadrest-operator-) *** ### [DAY 3](/day_03.md) - - Objects explained - - Objects, the big picture - - Syntax - - Object properties attributes (accessors, descriptors) - - Prototype - - Behavior Delegation - - Exotic Objects - - Object built-in methods - - Standard built-in objects + - [Objects explained](/day_03.md#objects-explained) + - [Objects, the big picture](/day_03.md#objects-the-big-picture) + - [Syntax](/day_03.md#syntax) + - [Object properties attributes (accessors, descriptors)](/day_03.md#properties) + - [Prototype](/day_03.md#prototype) + - [Behavior Delegation](/day_03.md#behavior-delegation) + - [Exotic Objects](/day_03.md#exotic-objects) + - [Object built-in methods](/day_03.md#object-built-in-methods) + - [Standard built-in objects](/day_03.md#standard-built-in-objects) *** ### [DAY 4](/day_04.md) - Indexed and Keyed Collections From f3c8d8e13b1eec0185fc03fe37732ec20d4f2640 Mon Sep 17 00:00:00 2001 From: Dan Ichim Date: Sun, 3 Nov 2024 01:44:10 +0200 Subject: [PATCH 4/6] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index f8729ea..8023987 100644 --- a/README.md +++ b/README.md @@ -71,7 +71,7 @@ Hopefully your walk will be much easier than mine! - [Behavior Delegation](/day_03.md#behavior-delegation) - [Exotic Objects](/day_03.md#exotic-objects) - [Object built-in methods](/day_03.md#object-built-in-methods) - - [Standard built-in objects](/day_03.md#standard-built-in-objects) + - [Standard built-in objects](/day_03.md#standard-built-in-objects) *** ### [DAY 4](/day_04.md) - Indexed and Keyed Collections From 67364c801e1cf4f9d26ac5662e02f1cbe5e63a0a Mon Sep 17 00:00:00 2001 From: Dan Ichim Date: Sun, 3 Nov 2024 01:46:24 +0200 Subject: [PATCH 5/6] Update day_03.md --- day_03.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/day_03.md b/day_03.md index a90a32a..99e301e 100644 --- a/day_03.md +++ b/day_03.md @@ -4,7 +4,7 @@ - [Objects explained](#objects-explained) - [Objects, the big picture](#objects-the-big-picture) - - [Syntax](#syntax) + - [Syntax](#the-syntax) - [Object properties attributes (accessors, descriptors)](#properties) - [Prototype](#prototype) - [Behavior Delegation](#behavior-delegation) @@ -80,7 +80,7 @@ Great, now we know this: Are we done? ... not even close!!!!! There's still much to see! -## [The syntax](#syntax) +## [The syntax](#the-syntax) In order to create a new object we can use 3 different syntax From ffd993d336584d685c1b7f7fcdcf3afd4466439f Mon Sep 17 00:00:00 2001 From: Dan Ichim Date: Sun, 3 Nov 2024 01:46:54 +0200 Subject: [PATCH 6/6] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 8023987..cc8f3d3 100644 --- a/README.md +++ b/README.md @@ -65,7 +65,7 @@ Hopefully your walk will be much easier than mine! ### [DAY 3](/day_03.md) - [Objects explained](/day_03.md#objects-explained) - [Objects, the big picture](/day_03.md#objects-the-big-picture) - - [Syntax](/day_03.md#syntax) + - [Syntax](/day_03.md#the-syntax) - [Object properties attributes (accessors, descriptors)](/day_03.md#properties) - [Prototype](/day_03.md#prototype) - [Behavior Delegation](/day_03.md#behavior-delegation)