title: how to add dynamic items in a collection in javascript?
body: <p>i want to add number of elements in a collection in javascript,as doing in following vb's code</p>
  
  <pre><code>    Dim myList As New List(Of String)
  
  
      Dim i As Integer
      For i = 0 To rep_UnAssignComps.Items.Count
          myList.Add(i)
      Next
  </code></pre>
  
  <p>I want to compare this collection with a particular value.provide me syntax for comparing the value also. like</p>
  
  <pre><code>myList.Contains(val1)
  </code></pre>