title: Set variable name as href id in JavaScript
body: <p>It might sound very stupid to you guys but I am having trouble setting a javascript variable name as href id.</p>
  
  <p>Code:</p>
  
  <pre><code>dataReceived =data[i].name;
  $("#someDiv").append("&lt;a href=\"#\" class=bookLink&gt;"+dataReceived+"&lt;/a&gt;" +"&lt;br&gt;");
  </code></pre>
  
  <p>I want to set id of the above link as dataReceived. My intention is to read the link id which will change depending on value of dataReceived and then use that ID to do whatever I want. Any help is appreciated.</p>
  
  <p>Thank You.</p>