for(var i=1;i<=($("input:regex(id,[0-9]+)").length);i++)
{
array.push($("#i").val());
}
Hey, I am tying to store the input value in the array. Each of the input has distinct id associated with it, in this case, 1,2,3,4 and so on. How can I change the i in
array.push($("#i").val());
accordingly with the counter i in the for loop, which would fetch the value from inputs. like if I got two inputs fields, whose ids are 1 and 2. After this codes execution, the array has two elements that are from the inputs. Thank you