Skip to content

Latest commit

 

History

History
15 lines (14 loc) · 472 Bytes

lessons-learned.md

File metadata and controls

15 lines (14 loc) · 472 Bytes

Managing Workspace/Git

JavaScript

declare DOM elements in an array with JSDOC

  // constants
  const domInputs = document.querySelectorAll('input');
  /** @type {Array.<HTMLInputElement>} */
  const [
    passwordOriginal = document.querySelector('input#password'),
    passwordToCompare = document.querySelector('input#confirm-password'),
    email = document.querySelector('input#email'),
    country = document.querySelector('#country'),
  ] = [];