В хром-инструментах, как я могу просмотреть объект [ОБЪЕКТ]? Тестирование контекста функции ключевого слова «это»Как узнать, что означает объект [Object Object] в инструментах Chrome?
var Calculator = function (eq) {
// private members...
var eqCtl = document.getElementById(eq),
foo = function() { };
return {
add: function (x, y) {
var val = x + y;
eqCtl.innerHTML = val;
},
print: function() {
console.log("print: this" + this);
this.test(this);
},
test: function (obj) {
console.log("test: this " + this);
console.log("this: obj" + obj);
}
}
};
Вы проверяете его на консоли? – adeneo