Mphasis interview question

Gave an example and asked to tell output. That question was based on JavaScript hoisting concept