I am using the following JavaScript code:
var a = [23, 34, 45, 33];
Is a
considered an array of integers?
Yes, a
is an array. However, since Javascript isn't statically typed, it can contain other types as well, such as strings, objects, other arrays and so on. Therefore, tagging it as "an array of integers" wouldn't be right.
JavaScript doesn't have an Integer type. It is an Array containing Numbers (but not limited to containing only Numbers)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With