I am experiencing an issue where my console statement is not displaying the length of the string array. Oddly enough, when I print 'list' within the for loop, it does show data.
public getText = (items: any) => {
let list: string[] = [];
for (let item of items) {
list.push(item);
}
console.log('list ' + list);
return list;
};
Furthermore, how can I go about calling this function?
Let's say I try to call the function using let items = ct.Text(titles);
, but unfortunately nothing gets printed when I attempt to do so.