How do I add data to the array?

I declared that variable:a data type is an array. How do I add data to the array?
i try failure:
variable:a
AppState.a[0] = [1]

or
AppState.a = [[1],[2]]

I would assume this to be more of EcmaScript in general than Genesys related.

Did you try,

a = [1,2];

Ref: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array