LYCOS RETRIEVER Beta Retriever Home  |  What is Lycos Retriever?   
Array: Methods
built 634 days ago
The following code creates the Array object vegetables with elements [spinach, green pepper, Cilantro, Onion, and Avocado]. The array is then sorted by the sort() method, which is called with no parameters the first time; the result is [Avocado,Cilantro,Onion,green pepper,spinach]. Then sort() is called on vegetables again with the CASEINSENSITIVE constant as a parameter. The result is vegetables sorted in alphabetical order ([Avocado, Cilantro, green pepper, Onion, spinach]).
Source:
Retrieves a result set that contains the elements of the SQL ARRAY value designated by this Array object. This method uses the specified map for type map customizations unless the base type of the array does not match a user-defined type in map, in which case it uses the standard mapping. This version of the method getResultSet uses either the given type map or the standard mapping; it never uses the type map associated with the connection.
Source:
The following code creates the Array object numbers with elements [3,5,100,34,10]. A call to sort() without any parameters sorts alphabetically, producing the undesired result [10,100,3,34,5]. To properly sort numeric values, you must pass the constant NUMERIC to the sort() method, which sorts numbers as follows: [3,5,10,34,100].
Source:
Retrieves the SQL type name of the elements in the array designated by this Array object. If the elements are a built-in type, it returns the database-specific type name of the elements. If the elements are a user-defined type (UDT), this method returns the fully-qualified SQL type name.
Source:
Prototype has no way to mark the methods it adds to Array.prototype as non-enumerable. Therefore, using for…in on arrays when using Prototype will enumerate all extended methods as well, such as those coming from the Enumerable module, and those Prototype puts in the Array namespace (described in this section, and listed further below).
Source:
SEARCH
MORE ABOUT