title: Why and when to use Symbol datatype in Typescript?
body: <p>I am learning typescript from past few days and came across a data type called Symbol. But I really did not understand the applications of it. </p>
  
  <p>When I can assign a string to a variable like below:</p>
  
  <pre><code>let str="mystring";
  </code></pre>
  
  <p>Why should I use -</p>
  
  <pre><code> let str=Symbol("mystring");
  </code></pre>
  
  <p>What is the advantage of using Symbol in typescript? What is the need of this data type and when to use it? Can someone explain please.            </p>