April 2020
Intermediate to advanced
716 pages
18h 55m
English
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: "Mount the downloaded WebStorm-10*.dmg disk image file as another disk in your system."
A block of code is set as follows:
addItem(item, cb) { let cart = [] if (typeof window !== "undefined") { if (localStorage.getItem('cart')) { cart = JSON.parse(localStorage.getItem('cart')) } cart.push({ product: item, quantity: 1, shop: item.shop._id }) localStorage.setItem('cart', JSON.stringify(cart)) cb() }}
When we wish to draw your attention to a particular part of a code block, the relevant ...