0

what is the meaning of this code:

aoData.push({"name":"more_data","value":"my_value"});

where is more_data and my_value get from?

2 Answers 2

1

more_data and my_value are strings... that means that value never change! They aren't variables!

aoData is an array, and push is adding in the array that values...

push function is like $arrayvar[] = "test"; on the PHP

It adds the value to the end of the array...

Sign up to request clarification or add additional context in comments.

Comments

0

aoData is an array defined somewhere and with push more elements are pushed into the array.

See:

Push Method

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.