I want to know if it is possible to declare an array in Javascript of the type "com.peregrine.servicecenter.PWS.Common.MessageType". In java it is easy but in javascript I have not idea. Thanks.
Tell me more
×
Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.
|
No, it is not possible. The Array in JS doesn't care what you've put in it, or even that the array indexes are numeric. Java, on the other hand, requires strict typing of both. I'd even go so far as to say that even | |||||
|
You cannot declare an array to exclusively consist of a particular type. However, you can declare an array ( | |||||
|
You can declare the array in such a way.
it can contain object or array of object by calling
Reference https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array | |||||
|