• The createThing function is a factory function that returns a Thing object. To get your string, you just need to call the Thing#getThing method:

    const thing = createThing();
    console.log(thing.getThing()); // prints "I'm a Thing"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment