title: what is the difference between symbol and weakmap in javascript private methods?
body: <p>I see using symbol and weak map  to create private members inside an object. are they similar? they both assigned to the a property outside the object and then get called inside the object.</p>
  
  <pre><code>   const _length=Symbol() or const _length=new Weakmap()
  </code></pre>
  
  <p>I understand symbol() easily however I do not get weakmap. In which case I should use weakmap or Can I use symbol all the time?</p>