title: Vanilla Javascript: Find a data attribute of the same name as an element given its id
body: <p>Is it possible to find an element that has a data attribute with the same name of an element's id in the DOM? (Is it a bad practice to give a data attribute the same value as an id?)</p>
  
  <p>Example syntax:</p>
  
  <p><strong>HTML:</strong></p>
  
  <pre><code>&lt;li id="tab-1"&gt;&lt;/li&gt;
  &lt;p data-tab="tab-1"&gt;Content 1&lt;/p&gt;
  </code></pre>
  
  <p>Would be curious as to how to accomplish this in Vanilla Javascript. Thank you ☺</p>
  
  <p><em>Edit</em>: I am hoping to make my code so that if I have the ID of the element, I can just look for a data attribute of the same value if I don't have it off the top of my head.</p>