Broken off from bug 13106.
A few key questions:
1. What counts as a number (leading/trailing junk, hexadecimal, non-integer, etc.)?
2. Should collection(argument) match collection[argument] or collection.item(argument), or should all three match?
3. Should collection.item() handle two arguments or only 1?
4. Should collection.item(argument) return null or undefined when argument is not found?
Created attachment 13696 [details]
testcase for null-like arguments
Created attachment 13697 [details]
test case for numeric arguments
We need to write a test for question 3. I think the rest are covered.