Master the JavaScript Interview: What is a Pure Function?
Eric Elliott
57219

Why return a cart object when calling addToCart(..) ?Function should have single responsibility : is it addToCart..AND…return cart? Unclean.