NEW YORK—Both the S&P 500 and the Nasdaq eked out record closing highs after a topsy-turvy Thursday on Wall Street, as investors focused on upbeat retail and technology earnings which outshone hawkish inflation comments from a Federal Reserve policymaker. By contrast, the Dow continued to play the laggard, registering its third decline this week, as Cisco Systems Inc. weighed on the benchmark. Inflation remains front and center for investors, and stock markets initially slipped after New York Federal Reserve Bank President John Williams said inflation is becoming more broad-based and that expectations for future price increases are rising. Both the S&P and Nasdaq had rebounded by late morning though, with the latter supported by Nvidia. The chipmaker jumped 8.2 percent after beating quarterly estimates and forecasting strong fourth-quarter revenue. The performance helped the Philadelphia semiconductor index advance 1.8 percent to hit its second record close in three sessions. The S&P …