Skip to content

Updates needed for _.extend #1

@gregthompson27

Description

@gregthompson27

underpants/underpants.js

Lines 608 to 613 in e8ac1da

_.extend = function (obj1, ...objects) {
obj1 = Object.assign(objects)
return obj1
}

@SpecTrail5, it looks like the issue here is that objects is potentially an array of objects. So you'll want to iterate through the array of objects, and for each object, add the properties of the object to obj1 using the Object.assign() method

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions