Functional JavaScript: Decoupling methods from their objects
Joel Thoms

Hi, Joel ! Thanks for your articles! It’s really cool that people like you (with great experience) sharing your knowledge with others, so we could learn something new! =) Can I ask you a question about doing shallow copy in the example with speakLoudly() function? This fn works without this shallow copy of obj ..maybe it needs for more complex examples? can you explain this please?

let speakLoudly = (obj)=> speak({anotherSound: obj.anotherSound.toUpperCase() + ‘!’})

P.S. Sorry for my english )

Like what you read? Give Ruslan a round of applause.

From a quick cheer to a standing ovation, clap to show how much you enjoyed this story.