Return math.min (math.floor(available [ingredients]/recipe[ingredient] || 0),val)},infinity) Its not the complete code but my question is why do we put the [] stuff and when do we use it..I know its used for indexing arrays I just wanna understand it Also used in object[key] stuff I wanna know when to apply it correctly and when not to miss it if am solving problems