What does the typeof operator return for an array in JavaScript?
- 'array'
- 'object'
- 'string'
- 'undefined'
The typeof operator in JavaScript returns 'object' for an array. Despite arrays being a specific type of object, typeof doesn't distinguish them from generic objects.
Loading...
Related Quiz
- You have a microservices architecture with multiple Docker containers. How would you ensure high availability and fault tolerance using Kubernetes?
- The CSS pseudo-elements allow you to style _______ parts of an element.
- What is Docker used for in containerization?
- Cache _______ allows for efficient utilization of memory resources by storing frequently accessed data.
- A _______ attack aims to overload a system's resources, making it unavailable to users.