5 ms·
Dealing with JavaScript's Automatic Semicolon Insertion
- elclanrs 14y ago-"But to save yourself time and troubles, just place them all the time"- Or to save even more time, just put semicolons before raw expressions (not very common at all) and omit them everywhere else. ASI is a feature not a problem like many people make it look like. A good informative article nonetheless. ;(function(){}()) // Common IIFE 'use strict'; // need semicolon here // Not very common without an assignment ;'string'.method() ;[0,1,2,3].method() ;/regex/.method()