function return the same value
<pre><code>N_ALPHA = 6;
N_CHOICES = 4;
ALPHABET = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
var alphabet = ALPHABET.substring(0, N_ALPHA);
var indexForm=new Array();
function guessStrToArr(inStr)
{ 
  {
    for (i=0;i&lt;N_CHOICES;i++)
    {
       indexForm[i]=alphabet.indexOf(inStr.charAt(i).toUpperCase());
    }
  }
 return indexForm;
}

function numBulls(guess, goal)
{
  guess=new Array (guessStrToArr(prompt('enter your guess1')));
  alert(guess);
  goal=new Array(guessStrToArr(prompt('enter your guess2')));
  var checkArray = new Array (guess.concat(goal); 
  alert(checkArray);

  var count=0;

  for (i=0;i&lt;N_CHOICES;i++)
  {
    if (guess[i]===goal[i])
    {
      count++
    }
  }
  return count;
}

numBulls();
</code></pre>

<p>when I run the above code, it returnt the same array, evern I type different code into prompt alet box. I don't know why, can you please help me?
Thank you very much.</p>
