September 2018
Intermediate to advanced
302 pages
7h 17m
English
You will learn about pure functions later in this book. Check out the following example to understand the basics:
// Code example from React readme. Comments added for clarity.// JavaScript pure function// for a given input always returns the same outputfunction NameBox(name) { return { fontWeight: 'bold', labelContent: name };}// Example with input'Sebastian Markbåge' ->{ fontWeight: 'bold', labelContent: 'Sebastian Markbåge' };
Going back to more practical examples, ...
Read now
Unlock full access