Yes, console.log is a function.
The first snippet uses the expected syntac for setTimeout
. The second calls console.log
inline, which returns undefined
. That comes the first argument to setTimeout
. That explains the different timing of when End of timeout
appears.