How to convert a String to a Symbol in JavaScript
<p>I need to find a way to convert any string to a symbol. If there was a function that did that, it would be something like this:</p>

<pre><code>function toSymbol(variable) = {
//... converts var to symbol
};

//toSymbol("mySymbolString") would return: mySymbolString
</code></pre>

<p>Is there any clever way of doing this other than storing potential string to symbol mappings in a dictionary?</p>