ECMAScript Cookbook
上QQ阅读APP看书,第一时间看更新

Conventions used

There are a number of text conventions used throughout this book.

CodeInText: Indicates code words in text, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, user input, and Twitter handles. Here is an example: "Next, in the same directory, create a file called hello.js, which exports a function named sayHi, which writes a message to the console."

A block of code is set as follows:

// hello.js 
export function sayHi () { 
  console.log('Hello, World'); 
} 

When we wish to draw your attention to a particular part of a code block, the relevant lines or items are set in bold:

import rocketName, { launch, COUNT_DOWN_DURATION } from './saturn-v.js'; 
import falconName, { launch as falconLaunch, COUNT_DOWN_DURATION as falconCount } from './falcon-heavy.js'; 

Any command-line input or output is written as follows:

cd ~/Desktop/es8-cookbook-workspace

Bold: Indicates a new term, an important word, or words that you see onscreen. For example, words in menus or dialog boxes appear in the text like this. Here is an example: "Double-click nvm-setup."

Warnings or important notes appear like this.
Tips and tricks appear like this.