In evaluating the mediator effect of TNF‐a, the indirect effect of T2DM on MoCA (X1b) was p = 0.668, with a test statistic of 0.428, and for the indirect effect of prediabetes on MoCA (X2b), it was p = 0.648, with a test statistic of 0.456. This evidence concerns the gene TNF and type 2 diabetes mellitus.