concept Algebraic Data Types in category javascript

This is an excerpt from Manning's book The Joy of JavaScript.
In part two, we will explore ways of exercising these objects by connecting them together using pure functions and composition. You will learn how to use functional programming (FP) principles centered around immutability, orthogonality, and Algebraic Data Types (ADT) to drive the business logic of your application. By this point, you’ll be well-versed with modern JavaScript idioms and will have learned how to implement your own ADT from scratch, a pattern that is becoming very popular in modern development projects. Placing functions front and center of your design takes advantage of JavaScript’s strongest feature: higher-order functions.
With the basics behind us, we’re going to kick it up a notch. Generally Algebraic Data Types come in two flavors: records and choices.