I wrote this comment last night but Reddit went down for maintenance right when I went to post. It looks like others have solved your question but thought I'd post anyway:
I think I just went through this lesson on freeCodeCamp. Is this part of the ES6 section in the JavaScript module?
As other commenters said, printNumTwo is a variable that is assigned the anonymous function that returns 'i'. Because 'i' is declared with the 'var' keyword and it's not within a function's scope, it's a global variable. After the for loop has finished running, the global variable 'i' has a value of 3 which is what gets returned when "printNumTwo" is called.
For what it's worth here are some notes of mine on the ES6 section, with excerpts from the FCC content as well: https://medleytext.net/share/note/ryo-Fsasm.