Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
typeof(null) = "object"
You are doing
if typeof(null) == "null"
and therefore the code fails. You should directly compare a null and not use a type comparison. The null value has not been 'caught' and then it tries to read the length of this value, which produces this error.You have to check first for null and then access the array. ;-)
"var highest = array[0];" is the first access....