I need to create a function in typescript that takes array as an input that accept any type of array. and then calculate the number of elements present in it and return it.
I want a output like let if user input : ["cricket","football"] then output : 2
how to solve this this using typescript?