I5 8400 VS I5 6600k at 4.2 ghz which is better

Solution
The i5 8400 is two generations newer than the Skylake 6600K and has six cores vs. Skylake's i5 series having four cores. While the overclocked Skylake technically has a higher core clock, the Coffee Lake 8400 will still be faster overall in both gaming and productivity. Plus, you get an upgrade path down the road if you wanted to upgrade to an i7 series down the line. I would never consider a two generation old chipset in a new build, especially considering Intel FINALLY decided to add more cores for each series of this chips for Coffee Lake.
The i5 8400 is two generations newer than the Skylake 6600K and has six cores vs. Skylake's i5 series having four cores. While the overclocked Skylake technically has a higher core clock, the Coffee Lake 8400 will still be faster overall in both gaming and productivity. Plus, you get an upgrade path down the road if you wanted to upgrade to an i7 series down the line. I would never consider a two generation old chipset in a new build, especially considering Intel FINALLY decided to add more cores for each series of this chips for Coffee Lake.
 
Solution