Builder Pattern in Javascript

For those who don't care about code readability: step on a lego

Suppose we go to a store and want to buy a product. Let’s say a PC. We have two options; either buy a ready-made PC of any particular brand, or we customize and assemble it.

In this scenario, we go for the second option — we will collect different parts and construct a new PC.