TypeScript: Cannot read property ‘push’ of undefined in [null]

The array needs to be initialized:

stringArr = [];

Leave a Comment