A Simple InvoiceFactory written in JavaScript