Airbnb welcome book template

broken image

Why? When JavaScript encounters a line break without a semicolon, it uses a set of rules called Automatic Semicolon Insertion to determine whether it should regard that line break as the end of a statement, and (as the name implies) place a semicolon into your code before the line break if it thinks so. See Translationġ.1 Primitives: When you access a primitive type you work directly on its value.Ĭonst numbers = // bad let sum = 0 for ( let num of numbers ) // bad createHero ( firstName, lastName, inventorOf ) // good createHero ( firstName, lastName, inventorOf, ) // good (note that a comma must not appear after a 'rest' element) createHero ( firstName, lastName, inventorOf , This guide is available in other languages too. It also assumes you are installing shims/polyfills in your app, with airbnb-browser-shims or the equivalent. Note: this guide assumes you are using Babel, and requires that you use babel-preset-airbnb or the equivalent.

broken image
broken image
broken image

A mostly reasonable approach to JavaScript

broken image