In order to show the password, we turn the password element to an usual textbox whose type attribute is text.
Here’s a trick for getting back a formatted month name (like January or Jan).
Use Element.insertAdjacentHTML() with a position of ‘beforebegin’ to parse htmlString and insert it before the start of el.
To check if an element contains a class, you use the contains() method of the classList property of the element.
Using the cloneNode(true) method will deep copy a given element.
Here’s a way to get the date for the next occurrence of a specific day of the week.
Use Element.parentNode to get the given element’s parent node. Use Element.removeChild() to remove the given element from its parent node.
To toggle a class of an element, you use the toggle() method of the classList property of the element.
Count the number of characters by handling the input event which is triggered if the value of element is changed.
A technique you can use to get all query string parameters and push them into an object of key/value pairs.