Basic ClojureScript | Section 2

Section 2: Basic ClojureScript

In this section, we will begin our exploration of ClojureScript as a language, discussing the essential elements that we will need for every application: variables, control flow, functions, JavaScript interop, and I/O. First, we will take a quick look at how functional programming languages view variables (after all, if data is immutable, it cannot vary, right?). Next, we will consider ClojureScript’s constructs for branching (if/else, etc.) and looping. Then we will learn how to extract common patterns into separate functions for reusability and clarity. Finally, we will cover the impure - or not purely functional - topics that are necessary in most ClojureScript code, JavaScript interoperability and user interaction via I/O. In the final lesson of this section, we will put these skills to use in building a temperature conversion app.