Anto Aravinth and Srikanth Machiraju
Beginning Functional JavaScriptUncover the Concepts of Functional Programming with EcmaScript 82nd ed.
Anto Aravinth
Chennai, Tamil Nadu, India
Srikanth Machiraju
Hyderabad, Andhra Pradesh, India
ISBN 978-1-4842-4086-1e-ISBN 978-1-4842-4087-8
Library of Congress Control Number: 2018964615
© Anto Aravinth, Srikanth Machiraju 2018
This work is subject to copyright. All rights are reserved by the Publisher, whether the whole or part of the material is concerned, specifically the rights of translation, reprinting, reuse of illustrations, recitation, broadcasting, reproduction on microfilms or in any other physical way, and transmission or information storage and retrieval, electronic adaptation, computer software, or by similar or dissimilar methodology now known or hereafter developed.
Trademarked names, logos, and images may appear in this book. Rather than use a trademark symbol with every occurrence of a trademarked name, logo, or image we use the names, log os, and images only in an editorial fashion and to the benefit of the trademark owner, with no intention of infringement of the trademark. The use in this publication of trade names, trademarks, service marks, and similar terms, even if they are not identified as such, is not to be taken as an expression of opinion as to whether or not they are subject to proprietary rights.
While the advice and information in this book are believed to be true and accurate at the date of publication, neither the authors nor the editors nor the publisher can accept any legal responsibility for any errors or omissions that may be made. The publisher makes no warranty, express or implied, with respect to the material contained herein.
Distributed to the book trade worldwide by Springer Science+Business Media New York, 233 Spring Street, 6th Floor, New York, NY 10013. Phone 1-800-SPRINGER, fax (201) 348-4505, e-mail orders-ny@springer-sbm.com, or visit www.springeronline.com. Apress Media, LLC is a California LLC and the sole member (owner) is Springer Science + Business Media Finance Inc (SSBM Finance Inc). SSBM Finance Inc is a Delaware corporation.
Introduction

The second edition of a book is always special. When I wrote the first edition, I had about two years of IT experience. The book received positive as well as negative responses. I always wanted to work on the negative responses to make the content better and make the book worth the price. In the meantime, JavaScript evolved a great deal. Many ground-breaking changes were added into the language. The Web is full of JavaScript, and imagine a world without the Web. Hard, right?

This second edition is a much improved version that teaches the fundamentals of functional programming in JavaScript. We have added much new content in this second edition; for example, we will be building a library for building web applications using functional concepts, and we have added sections on testing as well. We have rewritten the book to match the latest ES8 syntax with many samples of async, await patterns, and a lot more!

We assure you that you will gain a lot of knowledge from this book and at the same time you will have fun while running the examples. Start reading.

Acknowledgments

I remember the first code that I wrote for Juspay Systems in my first job as an intern. Coding was fun for me; at times it is challenging, too. Now with six years of software experience, I want to make sure I pass on all the knowledge I have to the community. I love teaching people. I love to share my thoughts with the community to get feedback. That’s exactly the reason I’m writing a second edition of this book.

I have to acknowledge few people who have been standing right next to me in all phases of my life: my late father Belgin Rayen, mother Susila, Kishore (brother-in-law), Ramya (sibling), and Joshuwa (my new little nephew). They have been supportive and pushed me harder to achieve my goals. I want to say thanks to Divya and the technical reviewer of this book, as they did a wonderful job. Luckily, I have a wonderful coauthor in Srikanth, who did an amazing job as well.

Finally, I want to give special thanks to Bianaca, Deepak, Vishal, Arun, Vishwapriya, and Shabala, who have added joy to my life.

Please reach out to me at anto.aravinth.cse@gmail.com with any feedback.

—Anto Aravinth

I would like to thank Apress for providing me a second opportunity to author. I would also like to thank my family, especially my dear wife Sonia Madan and my four-month-old son Reyansh for supporting me throughout this stint. I’m always reachable at Vishwanath.srikanth@gmail.com for any feedback or questions.

—Srikanth Machiraju

Table of Contents

Index 299

About the Authors and About the Technical Reviewer

About the Authors

Anto Aravinth
../images/429083_2_En_BookFrontmatter_Figb_HTML.jpg

has been in the software industry for more than six years. He has developed many systems that are written in the latest technologies. Anto has knowledge of the fundamentals of JavaScript and how it works and has trained many people. Anto is also does OSS in his free time and loves to play table tennis.

 
Srikanth Machiraju
../images/429083_2_En_BookFrontmatter_Figc_HTML.jpg

has over ten years of experience as a developer, architect, technical trainer, and community speaker. He is currently working as Senior Consultant with Microsoft Hyderabad, leading a team of 100 developers and quality analysts developing an advanced cloud-based platform for a tech giant in the oil industry. With an aim to be an enterprise architect who can design hyperscale modern applications with intelligence, he constantly learns and shares modern application development tactics using cutting-edge platforms and technologies. Prior to Microsoft, he worked with BrainScale as Corporate Trainer and Senior Technical Analyst on application design, development, and migrations using Azure. He is a tech-savvy developer who is passionate about embracing new technologies and sharing his learning via blog and community engagements. He has also authored the “Learning Windows Server Containers” and “Developing Bots with Microsoft Bot Framework,” blogs at https://vishwanathsrikanth.wordpress.com . He runs his own YouTube channel called “Tech Talk with Sriks” and is active on LinkedIn at https://www.linkedin.com/in/vishsrik/ .

 

About the Technical Reviewer

Sakib Shaikh
../images/429083_2_En_BookFrontmatter_Figd_HTML.jpg

has been working as a Tech Lead with a large scientific publisher, with more than ten years of experience as a full stack developer with JavaScript technologies on front-end and back-end systems. He has been reviewing technical books and articles for the past few years and contributes to the developer community as a trainer, blogger, and mentor.