Код: Выделить всё
var item = {
result: [[1,2,3],[4,5,6],[7,8,9]],
swap: {
transposing: function () {
function transposing_small($a, $b) {
arr = parent.this.result;
alert(arr);
}
transposing_small(0, 0);
}
}
}
2. если вызывать ф-ию transposing_small(this.result, 0, 0) - arr = undefined
В чем ошибка? Как я могу получить доступ к массиву result из ф-ии transposing_small?
Как получить доступ к родительскому объекту?