Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // case a)
- this.name = 'Clint';
- function a() {
- this.name = 'Al Pacino';
- function b() {
- this.name = 'Joseph';
- console.log(this.name);
- }
- }
- // output: Joseph
- // case b)
- this.name = 'Clint';
- function a() {
- this.name = 'Al Pacino';
- function b() {
- //this.name = 'Joseph';
- console.log(this.name);
- }
- }
- // output: Al Pacino
- // case c)
- this.name = 'Clint';
- function a() {
- // this.name = 'Al Pacino';
- function b() {
- // this.name = 'Joseph';
- console.log(this.name);
- }
- }
- // output: Clint
Add Comment
Please, Sign In to add comment