title: User input - Javascript Node js
body: <p>I'm new to js programming and to stackoverflow, I have a school homework in which i have to make a parser for vcards (the parser works fine, I can extract all the information I need) but in this parser I have to check if the contact(s) have more then two phone numbers and if they do they must choose at most 2 phone numbers. for this I made this function :</p>
  
  <pre><code>function checkPhone() {
  //compter le nombre de numéro par contact j
  for (i = 1; i &lt; nbrContact; i++) {
      var count = 0;
  
  
      //count phone numbers for one contact
      for (u = 0; u &lt; nbrPhones; u++) {
          if (phoneOf(i)[u] != undefined) {
              count++;
          }
      }
  
  
      //if a contact has more then 2 phone numbers
      if (count &gt; 2) {
          var question1 = "There are " + count + " phone numbers for the contact " + "\"" + fullName[i] + "\"" + ", Please choose the two you want to keep";
          console.log(question1);
  
          //print the phone numbers and their type for each contact 
          for (u = 0; u &lt; count; u++) {
              console.log(u  + "      " + phoneOf(i)[u] + " : " + phoneTypeOf(i)[u]);
          }
      }
  }
  </code></pre>
  
  <p>}</p>
  
  <p>PS : the phoneOf() and phoneTypeOf() returns arrays with the phone numbers and their types for each contact </p>
  
  <p>basically this function gives me this for a sample vcard with multiple contacts and two of them have more than 2 phones numbers:  (I need 10 reputation to post images please check this link <a href="http://www.upload-image.fr/images/2014/12/01/Sans_titre.png" rel="nofollow">here</a>)</p>
  
  <p>and the user must input a number in this case the variable "u", and i can't figure it out.</p>