Salesforce interview question

prototypal inheritance and scoping in JavaScript