Languages
[Edit]
EN

TypeScript - check if array is empty

0 points
Created by:
Brandy-Mccabe
724

Using TypeScript it is possible to check if an array is empty in the following way.

1. Custom function example

Edit

Note: Array.isArray(array) method can be useful too to check if constialbe is array type.

Output:

1
Donate to Dirask
Our content is created by volunteers - like Wikipedia. If you think, the things we do are good, donate us. Thanks!
Join to our subscribers to be up to date with content, news and offers.
Native Advertising
🚀
Get your tech brand or product in front of software developers.
For more information Contact us
Dirask - we help you to
solve coding problems.
Ask question.

❤️💻 🙂

Join