Skip to content

Add new lesson for creating/copying objects in JavaScript Objects module #1153

@LGH831

Description

@LGH831

Currently, there is no material on creating and/or copying JavaScript objects in the Objects module, with one exception: this lesson on deleting properties from objects, which briefly shows how to copy an object with excluded properties using the spread operator. While campers could deduce that the same technique works for copying an entire object, they might not fully understand why it works. Furthermore, current coding challenges in the module require creating an object from scratch, and at least one incoming lab will require campers to copy and return new objects.

Should we create a new lesson that covers creating objects from scratch as well as copying (spread operator for shallow copies and structuredClone for true deep copies)?

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions