text: module.exports = function check(str, bracketsConfig) {
    // your solution
    let o = [];
    let c = [];
    for (let b = 0; b < bracketsConfig.length; b++) {
      o[b] = bracketsConfig[b][0];
      c[b] = bracketsConfig[b][1];
    }
  
    let arrStr = str.split('');
    let arrlength = arrStr.length;
  
    for (let j = 0; j < arrlength; j++) {
  
      for (let i = 0; i < arrStr.length; i++) {
        if (arrStr[i] == o[0] && arrStr[i + 1] == c[0] ||
          arrStr[i] == o[1] && arrStr[i + 1] == c[1] ||
          arrStr[i] == o[2] && arrStr[i + 1] == c[2] || arrStr[i] == o[3] && arrStr[i + 1] == c[3] || arrStr[i] == o[4] && arrStr[i + 1] == c[4]) {
          arrStr.splice(i, 2);
        }
      }
    }
  
    if (arrStr.length == 0) {
      return true;
    } else {
      return false;
    }
  
  };