Abhinav Dhasmana
1 min readAug 23, 2018

--

Hi Jay Kim, thank you for reading the blog and leaving a comment. We are not using type in the new implementation.

New code
let offer = user.getOffer();
console.log(‘your offer is’, offer);
// makes payment or other activities
user.setOffer(UserOffer.goldOffer);

Old code:
let offer = user.getOffer();
console.log(‘your offer is’, offer);
// makes payment or other activities
user.setType(‘gold’);

--

--

Abhinav Dhasmana

Senior Staff Engineer @freshworks. Ex-McKinsey/Microsoft/Slideshare/SAP, Tech Enthusiast, Passionate about India. Opinions are mine