From June 4 to 5, 1942, The US Navy sank four Japanese heavy aircraft carriers and destroyed 248 aircraft , while losing one aircraft carrier and 150 aircraft at the Battle of Midway. The Japanese significantly outnumbered the American fleet. However, the advent of the aircraft carrier made other surface ships, like the battleship obsolete, in naval battles.

After six months of easy victories, the Japanese had "victory disease." Devising a plan to eliminate what remained of the American fleet, the Japanese planned to invade the island of Midway, an advanced base close to Hawaii. Any attempt to stop the invasion would be destroyed. The overconfidence clouded judgement as the Americans refused to act in the set piece manner predicted by the Japanese. Faulty intelligence, caused by the late arrival of Japanese submarines, left the Japanese unaware of the American fleet's presence. Moreover the Americans had recently broken the Japanese code and were aware of their plans. A diversion to the Aleutian Islands, weakened the Japanese at Midway and didn't fool the Americans, who concentrated everything on Midway.

More Info: en.wikipedia.org