A Javascript challenge utilising functions, complex objects, arrays, nested arrays and objects, .hasOwnProperty, and if/elseif