-1
Good afternoon, I am training my javascript, but I have a question that I could not find a solution on the internet, I want to increment an object array in loop, I found only how to increment array, being object in loop I could not solve, I thank you from now.
var post = {
teste: 'teste'
};
var i = 1;
while (i <= countOption) {
option = $('#options'+i).val();
post.option+i = questionOption;
i++;
}
console.log(post)
that’s the code I’m testing
Thanks man, that was good for me, VLW
– Faillen