This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Function getUBound(arr) | |
getUBound = -1 | |
On Error Resume Next | |
getUBound = UBound(arr) | |
On Error GoTo 0 | |
End Function | |
Function getLength(arr) | |
getLength = getUBound(arr) + 1 | |
End Function |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* A more robust 'typeof'. | |
* https://gist.github.com/wizard04wsu/8055356 | |
* | |
* | |
* For each of the type testing methods, the only parameter is the item to be tested. These methods do not perform coercion. | |
* | |
* is(o) - Returns the item's type. | |
* - NaN is considered its own type (instead of a number), since it essentially represents something that cannot be converted to a number. | |
* - For objects, the type of the object is given instead of just 'object' (e.g., 'Array'). |
NewerOlder