title: Attach or include a js file in Drupal 8
body: <pre><code>$description = $this-&gt;t('See the &lt;a onclick="drup()"&gt;drupal&lt;/a&gt; for options.');    
  </code></pre>
  
  <p>In the above code, drup() is a javascript function from a js file drupaljs.js . how do I include or attach the js file in the drupal 8 module. </p>
  
  <p>The following is the directory hierarchy for the code:
  drupal/core/modules/config_translation/src/FormElement/func.module</p>