Loading challenge...
Preparing the challenge details...
Loading challenge...
Preparing the challenge details...
Implement Object.assign from scratch: copy own enumerable properties (including Symbols) from sources onto the target.
Object.assign copies own enumerable string and symbol keys from one or more sources onto a target object. The trap: most implementations forget symbols. Using Reflect.ownKeys instead of Object.keys captures both. Remember to skip null/undefined sources without throwing, and to throw if the target itself is null/undefined.
Goal: Implement Object.myAssign with correct symbol support and null-source handling.
Continue learning with these related challenges
Implement Object.create using the classic empty-constructor trick to set an object's prototype chain.
Implement a function that recursively traverses an object, evaluates functions with given arguments, and transforms keys to lowercase. Master recursive object traversal and type checking.
Implement Array.prototype.reduce from scratch, including the tricky no-initial-value path and the empty-array error case.
Implement Object.create using the classic empty-constructor trick to set an object's prototype chain.
Implement a function that recursively traverses an object, evaluates functions with given arguments, and transforms keys to lowercase. Master recursive object traversal and type checking.
Implement Array.prototype.reduce from scratch, including the tricky no-initial-value path and the empty-array error case.