JavaScript-mancy: Getting Started
Minimum price
Suggested price

JavaScript-mancy: Getting Started

Getting Started With the Arcane Art of Writing Awesome JavaScript For C# Developers

About the Book

This is the first book of the JavaScript-mancy series. Within its mysterious pages you'll find:

  • A great introduction to the JavaScript language full of fantasy inspired examples and exercises
  • A detailed look at the new and awesome ES6 features in a historical context, highlighting why they exist and which problems they're trying to solve
  • A lot of references to C# that will make it super easy for C# and Java developers to wrap their heads around JavaScript and its quirks. (This also extends to developers familiar with strongly typed languages)
  • A breathtaking story of EPIC proportions and awkward sense of humor...

Imagine... imagine you lived in a world were you could use JavaScript to change the universe around you, to tamper with the threads that compose reality as you know it and do anything that you can imagine. Well, welcome to the world of JavaScript-mancy, where wizards, also known as JavaScriptmancers, control the arcane winds of magic wielding JavaScript to and fro and command the very fabric of reality.

We, programmers, sadly do not live in such a world. But we do have a measure of magic in ourselves, we have the skills and power to create things out of nothingness. And even if we cannot throw fireballs or levitate (yet), we can definitely change/improve/enhance reality and the universe around us with our little creations. Ain't that freaking awesome? 

Well, I hope this book inspires you to continue creating, and using this beautiful skill we share, this time, with JavaScript ;).

For many years JavaScript has been frowned upon and looked down on by many developers due to its quirky nature, obscure behaviors and many WTFs that populate its hairy APIs and operations.

Frown upon no more! For with modern design patterns, libraries, tools and the long awaited ECMAScript 6 (ES6, ES2015) writing JavaScript is now a pleasure.

Join me at the school of JavaScript-mancy as we travel along the modern landscape of writing JavaScript in 2015 and beyond, as we discover the organic evolution of this beautiful language and its thriving ecosystem, and delve in the latest features/spells/incantations of the JavaScript Arcana.

You my friend, can no longer ignore JavaScript. JavaScript is the most deployed language on earth, a beautiful and expressive language that supports many paradigms and which has a thriving community that continuously expands and improves its ecosystem with patterns, libraries, frameworks and tools. You don't want to miss this train.

But JavaScript, though forgiving and specially conceived to be easy to learn, can be either daunting for us that have a strongly-typed mindset and come from languages such as C# or Java or, more often, laughed at as a toy.

For you who consider it daunting and hate working with it worry not! I will show you the most common misconceptions and all the patterns you need to know to become as fluent in JavaScript as you are in C#.

For you who consider it a toy language, something associated not with real programming but with copy-paste coding or scripting to add flare to websites, I will show you all the different patterns and programming paradigms that JavaScript supports and which make it just as good and powerful as C#.

Let's get our JavaScript adventure started!

About the Author

Jaime González García
Jaime González García

Software Developer and UX guy, speaker, author & defender of all things nerd

Jaime is a software developer and UX designer who loves building stuff. Sometimes to solve a problem, sometimes for the challenge, but more often because he just loves creating things for the sake of it. And the quirkier and weirder, the better. He specially enjoys mixing carefully crafted software with visually appealing aesthetics.

Obnoxiously joyful dude, fake extrovert, undercover nerd, Jaime works as a Front-end Software Engineer at Google. He spends part of his time as a Developer Relations in the Nordics developer community. He speaks at conferences, writes articles, runs workshops and talks to developers and companies about how they can do cool things with JavaScript. He also arranges developer community events in Stockholm as a way to support and encourage the thriving local dev ecosystem.

In his spare time, he builds his own products, writes the JavaScript-mancy series of books and blogs at He loves spending time with his beloved wife Malin and son Teo, drawing, writing, reading fantasy and sci-fi, and lifting heavy weights.

Jaime González García

Episode 127

Bundles that include this book

Bought separately
Bundle Price

About the Contributors

Andreas Bäcklund
Andreas Bäcklund

Technical Reviewer

Andreas is a consultant, passionate programmer, double master and a lifelong learner.

Andreas enjoys all sorts of tech and has been developing software that runs on everything from ship engines to the cloud. He enjoys working in the full stack because it’s rewarding, exciting and challenging, all at the same time. 

Nathan Gloyn
Nathan Gloyn

Technical Reviewer

Independent software consultant and agile coach, Nathan is pas- sionate about development and a firm believer in agile principles. In his day job he is contractor helping clients to build and deliver working software.

Nathan has successfully bootstrapped agile teams in various com- panies and has given presentations on technology and agile at a number of events. 

Reader Testimonials

Andreas Wänqvist
Andreas Wänqvist

Software Developer at Simplygon

Doesn't matter if you are not in to #csharp or #javascript Just get it! :) Awesome work

Andreas Bäcklund
Andreas Bäcklund

Software Developer and IT Consultant at Active Solution

I read it and it's awesome! Book tip for those who want to gain/refresh some JS skills :)

Samuel Tremblay
Samuel Tremblay

Software Developer at NéoSynergix Inc.

I started reading a sample of this book yesterday and I'm in love with your writing style. Even if I've written a lot of Javascript and I already know about javascript scoping and all these hidden behaviors, I will buy your book just to read it like one goes to see a good movie. Good job!

Shawn Busuttil
Shawn Busuttil

Junior Front End Developer at Realm Entertainment Ltd

A book about JavaScript that is both well-written and at the same time written in style is hard to come by! Even if you are not a beginner in JS or a C# developer, this book is a total gem of the ES6 era.

Table of Contents

    • About The Author
    • About the Technical Reviewers
    • Prelude
      • A Story About Why I Wrote This Book
      • Why Should You Care About JavaScript?
      • What is the Goal of This Book?
      • What is the Goal of The JavaScript-mancy Series?
      • Why JavaScript-mancy?
      • Is This Book For You?
      • How is The Book Organized?
      • How Are The JavaScript-mancy Series Organized? What is There in the Rest of the Books?
      • Understanding the Code Samples in This Book
      • A Note About ECMAScript 5 and ECMAScript 6,7 within The Book
      • A Note About the Use of Generalizations in This Book
      • Do You Have Any Feedback? Found Any Error?
      • A Final Word From the Author
  • Tome I. Mastering the Arcane Art of JavaScript-mancy
    • Introduction
    • Once Upon a Time…
    • The Essential Ingredients Of JavaScript-Mancy
      • An Introduction to JavaScript-Mancy
      • JavaScript
      • JavaScript Has Some Types
      • Strings in JavaScript
      • Functions in JavaScript
      • OOP and Objects in JavaScript
      • Arrays, Maps and Sets in JavaScript
      • JavaScript Flow Control
      • Logical Operators in JavaScript
      • Exception Handling
      • Regular Expressions
      • But Beware, JavaScript Can Be Weird and Dangerous
      • Concluding
    • The Basics Of JavaScript Functions
      • The Basics Of Functions
      • Functions are the Key
      • Function Expressions
      • Function Declarations
      • Concluding: Prefer Function Declarations and Named Function Expressions
      • Exercises
    • Useful Function Patterns: Default Arguments
      • Have You Heard Of Defaults?
      • Using Default Arguments in JavaScript Today
      • Defaults with Objects
      • Native Default Arguments with ECMAScript 6
      • Concluding
      • Exercises
    • More Useful Function Patterns: Arbitrary Arguments
      • An Arbitrary Number of Arguments
      • The Craziness Of Function Arguments in JavaScript
      • Functions with Arbitrary Arguments Right Now!
      • Array-Like Objects
      • Native Arbitrary Arguments with ES6 Rest Parameters
      • Concluding
      • Exercises
    • More Useful Function Patterns: Function Overloading
      • Have you Heard About The Marvels Of Overloading?
      • The Problem with Function Overloading in JavaScript
      • How Do We Do Function Overloading Then?
      • Function Overloading by Inspecting Arguments
      • Using an Options Object
      • Relying on ES6 Defaults
      • Taking Advantage of Polymorphic Functions
      • Concluding
      • Exercises
    • On the Art of Summoning Servants and Critters, Or Understanding The Basics of JavaScript Objects
      • An Army of Objects
      • Object Initializers (a.k.a. Object Literals)
      • Creating Objects With Factories
      • Data Privacy in JavaScript
      • ES6 Improves Object Initializers
      • ES6 Symbols and Data Privacy
      • Concluding
      • Exercises
    • Mysteries of the JavaScript Arcana: JavaScript Quirks Demystified
      • A Couple of Tips About JavaScript Quirks and Gotchas
      • A Quick Refresher of the JavaScript Arcana 101
      • This, Your Most Dangerous Foe
      • Global Scope by Default and Namespacing in JavaScript
      • Type Coercion Madness
      • Using JavaScript in Strict Mode
      • Concluding
      • Exercises
    • A Guide to Strings, Finding the Right Words and Proper Spell Intonation
      • Find the Right Words You Must
      • The Basic Of Strings
      • New String Features in ES6
      • String Cheatsheet
      • Concluding
      • Exercises
    • Upgrading Your Everyday JavaScript Magic With ES6 - Destructuring
      • Welcome to the Future! ECMAScript 6
      • Destructure All The Things!
      • Destructuring Objects
      • Destructuring Arrays
      • Destructuring Function Arguments
      • Concluding
      • Exercises
    • Upgrading Your Everyday JavaScript Magic With ES6 - Arrow Functions
      • Behold! The Arrow Function!
      • Arrow Functions Arcana
      • Arrow Functions And This Gotchas
      • Arrow Functions Don’t Have Arguments Object
      • Arrow Functions and the New and Super Operators
      • Concluding
      • Exercises
    • Upgrading Your Everyday JavaScript Magic With ES6 - The Spread Operator
      • Ready To Spread Your Wings?
      • Use the Spread Operator to Seamlessly Concatenate Arrays
      • Easily Use Apply With the Spread Operator
      • Converting Array-likes and Collections Into Arrays
      • Spread Lets You Combine New and Apply
      • Concluding
      • Exercises
  • Tome I.II JavaScriptmancy and Data Structures
    • JavaScript Arrays: The All-in-one Data Structure
      • We’ll Just Need To Make Sense of All These Items
      • JavaScript’s Array
      • An Extremely Flexible Data Structure
      • Sorting Arrays
      • Safe Array Methods
      • JavaScript Arrays and LINQ
      • Other ES6 and ES7 Features
      • Array Cheatsheet
      • Concluding
      • Exercises
    • Organizing Your Data With ES6 Maps
      • Take a Look at These Maps
      • JavaScript’s Map
      • Iterating Over the Elements of a Map
      • Creating a Map From an Iterable Collection
      • Map Cheatsheet
      • Concluding
      • Exercises
    • Sets, For When There Can Only Be One
      • You Are One of a Kind
      • Working With Sets
      • Iterating Sets
      • Using Array Methods With Sets
      • How Do Sets Understand Equality?
      • Sets Cheatsheet
      • Concluding
      • Exercises
  • Book I. Epilogue
  • Tome I.III JavaScriptmancy and OOP: The Path of The Summoner (preview)
    • Introduction to the Path of Summoning and Commanding Objects (a.k.a. Object Oriented Programming)
      • A Soft Introduction to OOP in JavaScript
      • C# Classes in JavaScript
      • OOP Beyond Classes
      • Combining Classes with Object Composition
      • The Path of the Object Summoner Step by Step
      • Concluding
  • References and Appendix
    • Appendix A. Setting Up Your Developing Environment For ES6
      • Using ES6 with Node.js
      • ES6 and Modern Browsers
      • Real-World ES6 Development Environments
    • Appendix B. Fantasy Glossary
    • References
      • Specifications
      • Books
  • Notes

The Leanpub 60-day 100% Happiness Guarantee

Within 60 days of purchase you can get a 100% refund on any Leanpub purchase, in two clicks.

See full terms

80% Royalties. Earn $16 on a $20 book.

We pay 80% royalties. That's not a typo: you earn $16 on a $20 sale. If we sell 5000 non-refunded copies of your book or course for $20, you'll earn $80,000.

(Yes, some authors have already earned much more than that on Leanpub.)

In fact, authors have earnedover $12 millionwriting, publishing and selling on Leanpub.

Learn more about writing on Leanpub

Free Updates. DRM Free.

If you buy a Leanpub book, you get free updates for as long as the author updates the book! Many authors use Leanpub to publish their books in-progress, while they are writing them. All readers get free updates, regardless of when they bought the book or how much they paid (including free).

Most Leanpub books are available in PDF (for computers) and EPUB (for phones, tablets and Kindle). The formats that a book includes are shown at the top right corner of this page.

Finally, Leanpub books don't have any DRM copy-protection nonsense, so you can easily read them on any supported device.

Learn more about Leanpub's ebook formats and where to read them

Write and Publish on Leanpub

You can use Leanpub to easily write, publish and sell in-progress and completed ebooks and online courses!

Leanpub is a powerful platform for serious authors, combining a simple, elegant writing and publishing workflow with a store focused on selling in-progress ebooks.

Leanpub is a magical typewriter for authors: just write in plain text, and to publish your ebook, just click a button. (Or, if you are producing your ebook your own way, you can even upload your own PDF and/or EPUB files and then publish with one click!) It really is that easy.

Learn more about writing on Leanpub