text: import { NotImplementedError } from '../extensions/index.js';
  
  /**
   * Implement class DepthCalculator with method calculateDepth
   * that calculates deoth of nested array
   * 
   * @example
   * 
   * const depthCalc = new DepthCalculator();
   * depthCalc.calculateDepth([1, 2, 3, 4, 5]) => 1
   * depthCalc.calculateDepth([1, 2, 3, [4, 5]]) => 2
   * depthCalc.calculateDepth([[[]]]) => 3
   *
   */
  export default class DepthCalculator {
    calculateDepth(arr) {
      let counter = 1 // массив
      let localCounter = 0 // массив внутри
      // пробежим по каждому элементу
      arr.forEach(element=>{ 
       // проверим является ли элемент массивом
        if (Array.isArray(element)){
          const depth = this.calculateDepth(element)
          if (localCounter < depth) {
            localCounter = depth
          }
        }
      })
      counter = counter + localCounter
      return counter
    }
  
  };