Skip to content

Latest commit

 

History

History
28 lines (22 loc) · 441 Bytes

File metadata and controls

28 lines (22 loc) · 441 Bytes


Semicolons

// bad
(function() {
  const name = 'Skywalker'
  return name
})()

// good
(() => {
  const name = 'Skywalker';
  return name;
})();

// good (guards against the function becoming an argument when two files with IIFEs are concatenated)
;(() => {
  const name = 'Skywalker';
  return name;
})();

Read more.