I think you could have added an example on changing properties when copying an object:
const user = { firstName: "John", lastName: "D", age: 25, }; const newUser = {...user, firstName: "Jane"} console.log(newUser); // Output: { // firstName: "Jane", // lastName: "D", // age: 25, // jobName: "Developer" //};
Hello, Thank you for the feedback! I added your suggestion to the article. It's a good example that can help people to understand better how to create or copy objects! (I think you wanted to write about objects, not arrays?)
Oh yes object haha didn't see the typo
Haha no problem! 😃 👍
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
I think you could have added an example on changing properties when copying an object:
Hello,
Thank you for the feedback! I added your suggestion to the article.
It's a good example that can help people to understand better how to create or copy objects! (I think you wanted to write about objects, not arrays?)
Oh yes object haha didn't see the typo
Haha no problem! 😃 👍