Skip to content

Flag and country flipped -> fix: keep in line with initial example - #70

Open
hugolpz wants to merge 1 commit into
samanthaming:mainfrom
hugolpz:patch-1
Open

Flag and country flipped -> fix: keep in line with initial example#70
hugolpz wants to merge 1 commit into
samanthaming:mainfrom
hugolpz:patch-1

Conversation

@hugolpz

@hugolpz hugolpz commented Dec 9, 2021

Copy link
Copy Markdown

In section : https://www.samanthaming.com/tidbits/70-3-ways-to-clone-objects/#shallow-clone-vs-deep-clone
Checked on live code on jsfiddle : https://jsfiddle.net/qs9k2j8x/

Your start with object :

const nestedObject = {flag: '馃嚚馃嚘',country: {
 聽 聽city: 'vancouver',},
};

But then the following examples seems to work on the basis of this :

const nestedObject = {country: '馃嚚馃嚘',{ city: 'vancouver'},
};

The initial country: has disapeared.
flag has disappeared, replaced by country.
The second element of this object has no key/value, just an object聽{ city: 'vancouver'聽}, which returns Uncaught SyntaxError: Unexpected token '{'".

@hugolpz hugolpz changed the title Flag and country flipped -> fixed Flag and country flipped -> keep in line with initial example Jan 8, 2022
@hugolpz hugolpz changed the title Flag and country flipped -> keep in line with initial example Flag and country flipped -> fix: keep in line with initial example Jan 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant