title: $localstorage vs cookies in angularjs
body: <p>When through the cookies and localstorage in angularjs, they meant to be the same and still have doubt in it so, my questions are:</p>
  
  <p>1.What is the main difference between cookies and localstorage?</p>
  
  <p>2.On which scenario we make use of these?</p>
  
  <p>3.How do they differ from each other?</p>
  
  <p>4.Give an example for cookie and localstorage (for better understanding)</p>