var x = 20; var A = function () { this.list = [1, 2, 3, 4, 5]; this.x = 2; } A.prototype.test = function() { var self = this; // или var that = this;e this.list.forEach(function (element) { console.log(Math.pow(element, self.x)); }); } var a = new A(); a.test();