" /> How do I add data to the array? - Genesys CTI User Forum

Author Topic: How do I add data to the array?  (Read 1364 times)

Offline memo

  • Newbie
  • *
  • Posts: 13
  • Karma: 0
How do I add data to the array?
« on: August 27, 2020, 10:33:07 AM »
Advertisement
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]]

Offline Campfire

  • Jr. Member
  • **
  • Posts: 73
  • Karma: 0
  • If you must blink, do it now.
Re: How do I add data to the array?
« Reply #1 on: October 09, 2020, 02:04:53 PM »
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