What result you will achieve when run the following code and why it happens? // Code Start var UserObject = { outer: "footer", func: function() { var self = this; document.write("outer func:...


What result you will achieve when run the following code and why it happens?
// Code Start
var UserObject = {
outer: "footer",
func: function() {
var self = this;
document.write("outer func: this.outer = " + this.outer + "
");
document.write("outer func: self.outer = " + self.outer + "
");
(function() {
document.write("inner func: this.outer = " + this.outer + "
");
document.write("inner func: self.outer = " + self.outer + "
");
}());
} };
UserObject.func();
// Code End



Jun 09, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here