but when for the same result, I assign a variable, it does not -
ticker.subscribe(global.tokenSubscriptionList); ticker.setMode(ticker.modeLTP, global.tokenSubscriptionList); // where global.tokenSubscriptionList is an array with values - 15020290, 15020034, 877057
Yes I tried that and the typeOf shows up as object for both. But
ticker.subscribe(global.tokenSubscriptionList);
ticker.setMode(ticker.modeLTP, global.tokenSubscriptionList);
is not working i.e. the ticks are not being returned.
global.tokenSubscriptionList = [];
global.tokenSubscriptionList.push('15020290')
global.tokenSubscriptionList.push('15020034')
global.tokenSubscriptionList.push('877057')
console.log (global.tokenSubscriptionList + " global variable");
//returns 15020290,15020034,877057 global variable
Option 2 -
var items = [15020290, 15020034, 877057];
console.log (items + " items variable");
//returns 15020290,15020034,877057 items variable
but Option 1 does not trigger onTicks call at all whereas Option 2 does as expected.
Finally, it worked with
global.tokenSubscriptionList.push(parseInt(15020290))
The subscribe method expects only Integer type I guess.