liveBook · Manning

Chapter 1: Chapter 1. JavaScript is everywhere

What you will learn in chapter 1 of Secrets of the JavaScript Ninja, Second Edition

The chapter introduction uses two developers’ experiences to show why JavaScript skills transfer across application domains and why the language has spread beyond web pages.

After this chapter you will be able to

Section by section

Introduction

The chapter introduction uses two developers’ experiences to show why JavaScript skills transfer across application domains and why the language has spread beyond web pages.

Key terms: JavaScript, skill transferability, JavaScript engines, Node, Apache Cordova, Ionic, Electron

1.1 Understanding the JavaScript language

This section shows why JavaScript’s familiar-looking syntax can hide distinctive language concepts and briefly identifies advanced features that help make code more effective.

Key terms: first-class objects, function closures, scopes, prototype-based object orientation, class-based object orientation, prototypes, generators, promises, proxies, maps

1.1 Do you know?

This section poses two self-check questions about Babel and Traceur and the browser JavaScript API without explaining either topic.

1.1.1 How will JavaScript evolve?

This section explains JavaScript’s shift toward smaller yearly standards updates and why new features may not yet work in every browser.

Key terms: ECMAScript committee, ES6, ES7/ES2016, yearly incremental changes, language specification, JavaScript engine, feature support, browsers, compatibility lists

1.1.2 Transpilers give us access to tomorrow’s JavaScript today

The section explains how transpilers let developers use newer JavaScript features when some users have older browsers.

Key terms: transpilers, cutting-edge JavaScript code

1.2 Understanding the browser

The section introduces the browser concepts that client-side JavaScript relies on and explains why browser differences matter.

Key terms: Document Object Model, DOM, UI, HTML, event-driven, events, timers, Browser API, browser-specific quirks, cross-browser

1.3 Using current best practices

This section explains why JavaScript expertise also requires development best practices.

Key terms: best practices, debugging skills, testing, performance analysis

1.3.1 Debugging

This section explains why browser developer tools, rather than alerts, are the practical way to debug JavaScript applications.

Key terms: developer tools, alert, DOM, CSS styles, network events

1.3.2 Testing

The section introduces assertions as a way to test whether example code behaves as expected.

Key terms: assert function, assertion, condition

1.3.3 Performance analysis

This section explains why JavaScript performance still needs attention and how to time an operation reliably with console timers and repeated runs.

Key terms: performance analysis, JavaScript engines, console.time, console.timeEnd, built-in console object, for loop, maxCount, measurable value

1.4 Boosting skill transferability

The section explains why JavaScript and browser knowledge transfers to desktop, mobile, server-side, embedded, and cloud applications.

Key terms: fundamental JavaScript principles, core APIs, client-side web applications, NW.js, Electron, Apache Cordova, Node.js, wrapped browser, platform-specific APIs

1.5 Summary

Where this is used later

Concepts explained in this chapter

Chapter 2: Chapter 2. Building the page at runtime →

These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.