Skip to content

Latest commit

 

History

History
25 lines (19 loc) · 336 Bytes

option.md

File metadata and controls

25 lines (19 loc) · 336 Bytes

Option

Options with defaults

let options = {
  option1: 'MyOption'
};

let defaults = {
  option1: 'Hello',
  option2: 'World'
};

let o = Object.assign({}, defaults, options);
console.log(o.option1);

After DOM has loaded

document.addEventListener("DOMContentLoaded", function(e) {
  // Do something
});