title: Javascript: $$ Global Variable Considered Evil?
body: <p>I am writing a lot of Javascript code these days and I am making good use of JQuery.  I am wondering if it is considered evil to create <strong>strange</strong> global variable names.  I know that a lot of Javascript frameworks such as  JQuery use the dollar character; <code>$</code>, but that greatly simplifies code as it can do so many things.</p>
  
  <p>I am thinking of creating a <code>$$</code> global variable in my code which would be defined as below:</p>
  
  <pre><code>function $$(tagName) 
  { 
      return $('&lt;' + tagName + ' /&gt;'); 
  }
  </code></pre>
  
  <p>The benefit of this is that my code has (1) abstracted out the logic of creating a new element, (2) made the code more concise, and lastly (3) I can almost create html elements within Javascript as concisely as html itself because JQuery has so many other selectors to chain off:</p>
  
  <pre><code>$$('div').attr( { id : 'myDiv', 'class' : 'MyDivClass' }).append(
      $$('ul').append(
          $$('li').text('first'),
          $$('li').text('second'),
          $$('li').text('third')
      );
  );
  </code></pre>
  
  <p>Do you believe the above approach of creating <code>$$</code> is legitimate or would you regard it as a no-no?</p>