javascript array from input fields

javascript array from input fields

what is the best/easiest/fastest way to get an array of the values from a few input fields?

  1. <input type="text" name="a" value="x" />
  2. <input type="text" name="a" value="y" />
  3. <input type="text" name="a" value="z" />

to [ 'x', 'y', 'z' ]