This is part of a series that I plan on doing throughout the year: A Function a Day
Since I’ll be working with the DOM alot I’ll embed these functions in codepen.
[codepen_embed height=”300″ theme_id=”21518″ slug_hash=”MzJrXN” default_tab=”js,result” user=”Kauress”]See the Pen <a href=’https://codepen.io/Kauress/pen/MzJrXN/’>Day 1: JavaScript function to select a DOM element</a> by Kauress (<a href=’https://codepen.io/Kauress’>@Kauress</a>) on <a href=’https://codepen.io’>CodePen</a>.[/codepen_embed]