Hmm in simple terms…
console.log inside a for loop or a function would be to check if things are working within the loop before getting the the end result.
console.log in a global scope would be to check if the end result of a function or if the value of a function is what you wanted.
That’s the way I see it.