A TW homework using some function implementation of a pos client to learn js coding and refactoring.