Skip to content
This repository was archived by the owner on Sep 25, 2020. It is now read-only.
This repository was archived by the owner on Sep 25, 2020. It is now read-only.

official solution to final problem doesn't work #28

@greph

Description

@greph

// -> Add 'core' to robby.parts, cranky.parts should still be empty
// -> Add 'fly' to robby.capabilities, after doing that cranky.capabilities must
// also have 'fly' without adding to it directly, so this property has to be
// shared

official solution:
robby.parts.push('core');
robby.capabilities.push('fly');

working solution:
robby.parts = ['core'];
robby.proto.capabilities.push('fly');

Please correct me if I am wrong here, but it looks like the array.push updates the values for both instances.

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