Initial JS tools: findMin and findMax