JSFiddle - React, Tailwind, and code Playground
by CitizenOne
JavaScript
//'use strict';
let group = {
title: "Наш курс",
students: ["Вася", "Петя", "Даша"],
showList: function() {
this.students.forEach(function(student) {
alert(this.title + ': ' + student); // будет ошибка
}.bind(this))
}
}
group.showList();