function foo() {
console.log('always');
return 'once'
}
foo()
foo()
foo()
The output looks like - always always always once
I want to know what happens during execution so that "always" is printed thrice but "once" is printed (returned) only once.